**Problem Statement:**
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.
**Hint / Expected Approach:**
XOR or Gauss sum trick
**Edge Cases to Consider:**
- (1) Missing 0
- (2) Missing n (last element)
- (3) Single-element array