Array nums holds n distinct values from the range [0, n] — exactly one value is missing. Find it in O(n) time and O(1) space.
Input: one line of space-separated integers. Output: the missing value.
3 0 1
2
9 6 4 2 3 5 7 0 1
8
Run your code against the sample tests, or Submit to run the full suite.