:type nums: List[int] :rtype: int
(self, nums)
| 36 | """ |
| 37 | class Solution(object): |
| 38 | def missingNumber(self, nums): |
| 39 | """ |
| 40 | :type nums: List[int] |
| 41 | :rtype: int |
| 42 | """ |
| 43 | # x = list(set(range(max(nums)+1)) - set(nums)) |
| 44 | # if x: |
| 45 | # return x.pop() |
| 46 | # else: |
| 47 | # return max(nums)+1 |
| 48 | all_nums = sum(range(len(nums)+1)) |
| 49 | |
| 50 | for i in nums: |
| 51 | all_nums -= i |
| 52 | |
| 53 | return all_nums |
nothing calls this directly
no outgoing calls
no test coverage detected