nums holds n different numbers taken from 0, 1, ..., n. Exactly one number from that range is missing. Return it.
Example 1
Input:
missing_number([3, 0, 1])
Output:
2
The numbers are from 0 to 3 and 2 is missing.
Example 2
Input:
missing_number([0])
Output:
1
The numbers are from 0 to 1 and 1 is missing.
1 <= len(nums) <= 3 * 10**50 and len(nums).No results yet
Run your code to check it against the examples, or submit to run every test.