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 8fb92b4 commit 7ca9c48Copy full SHA for 7ca9c48
268-Missing-Number.py
@@ -0,0 +1,7 @@
1
+class Solution:
2
+ def missingNumber(self, nums: List[int]) -> int:
3
+ res = len(nums)
4
+
5
+ for i in range(len(nums)):
6
+ res += (i - nums[i])
7
+ return res
0 commit comments