Given an array containing n distinct numbers in range [0, n], find the one missing number.
Input: nums=[3,0,1] Output: 2 Input: nums=[0,1] Output: 2 Input: nums=[9,6,4,2,3,5,7,0,1] Output: 8
Unlock hints progressively — start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features