Skip to content

Commit e88a7dd

Browse files
committed
add time and space
1 parent 0d82bff commit e88a7dd

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

palindromic-substrings/delight010.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class Solution {
2+
// Time O(n^2)
3+
// Space O(n)
24
func countSubstrings(_ s: String) -> Int {
35
let charArray = Array(s)
46
var count = 0

reverse-bits/delight010.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class Solution {
2+
// Time O(1)
3+
// Space O(1)
24
func reverseBits(_ n: Int) -> Int {
35
var number = n
46
var result = 0

0 commit comments

Comments
 (0)