Given an array of integers nums containing n distinct numbers taken from 0 to n, find the one number that is missing from the array.
You must implement an algorithm that runs in O(n) time and uses O(n) space.
Example 1:
Input: nums = [3, 0, 1]
Output: 2
Example 2:
Input: nums = [9,6,4,2,3,5,7,0,1]
Output: 8
n == nums.length0 <= n <= 10^4