You are given an array nums that contains n distinct integers in the range [0, n].
The array represents a sequence of unique numbers, but exactly one number is missing from the full range.
Your task is to find and return the missing number.
Input: nums = [4, 2, 1, 0]
Output: 3
Input: nums = [1, 2, 3, 4]
Output: 0
Input: nums = [5, 3, 0, 1, 4]
Output: 2
Accepted:
Submission: