오늘은 배열에서 Missing Number 찾기!
class Solution:
def missingNumber(self, nums: List[int]) -> int:
for i in range(len(nums) + 1):
if i not in nums:
return i
return None
엄 청 쉽 다
따로 설명을 하지 않아도 된다.
시간이... 좀 많이 걸리긴 했지만 오늘 할 연구가 많아서 패스...
'Leetcode' 카테고리의 다른 글
Leetcode 26. Remove Duplicates from Sorted Array (0) | 2021.12.12 |
---|---|
Leetcode 563. Binary Tree Tilt (0) | 2021.12.09 |
Leetcode 1137. N-th Tribonacci Number (0) | 2021.11.16 |
Leetcode 20. Valid Parentheses (0) | 2021.11.15 |
Leetcode 122. Best Time to Buy and Sell Stock II (0) | 2021.11.10 |