[LeetCode] 268. Missing Number
Python
class Solution:
def missingNumber(self, nums: List[int]) -> int:
temp = 0
for i in sorted(nums):
if i != temp:
return temp
temp += 1
return temp
댓글남기기