We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5740518 commit 76ce972Copy full SHA for 76ce972
missing-number/sun912.py
@@ -0,0 +1,12 @@
1
+"""
2
+TC: O(n)
3
+SC: O(n)
4
5
+
6
+class Solution:
7
+ def missingNumber(self, nums: List[int]) -> int:
8
+ nums_set = set(nums)
9
+ for i in range(len(nums)):
10
+ if i not in nums_set:
11
+ return i
12
+ return len(nums)
valid-palindrome/sun912.py
@@ -1,3 +1,7 @@
class Solution:
def isPalindrome(self, s: str) -> bool:
str = list(s.lower())
0 commit comments