Given an array `nums` containing `n` distinct numbers in the range `[0, n]`, return the only number in the range that is missing from the array.
XOR or Gauss Sum
We know that the sum of the first `n` numbers is `n * (n + 1) / 2`. If we subtract the sum of the numbers in the array from this expected sum, the result is the missing number. Alternatively, XORing all indices `[0, n]` and all numbers in the array will also reveal the missing number because `x ^ x = 0`.