Easy · Math
Find missing number
Given an array nums of n distinct integers taken from the range 0..n, return the one number in that range that does not appear in nums.
Examples
Example 1
[3,0,1] → 2Output: missing = 2
Example 2
[0,1,3,4] → 2Output: missing = 2
Rebuild it in the studio
Open every published interview problem, solution, scene, and memory room free, with no account.