At Stripe, a service emits every integer from 0 to n exactly once, but one value is missing from the final array. Given an array nums containing n distinct integers in the range [0, n], return the missing number.
nums[0, n]len(nums) = nnums are distinct[0, n]Example 1
nums = [3, 0, 1]20, 1, 2, 3, so 2 is missing.Example 2
nums = [0, 1]20, 1, 2, and 2 does not appear.Example 3
nums = [9, 6, 4, 2, 3, 5, 7, 0, 1]80 to 9 appears except 8.1 <= len(nums) <= 10^50 <= nums[i] <= len(nums)nums are unique[0, n] is missing