Back to DSA
Missing Number
mediumAn array holds n distinct integers drawn from the range [0, n]. Exactly one number in that range is absent. Find and return it.
Examples
Example 1:
Input:
nums = [0,1,3]Output:
2 Example 2:
Input:
nums = [5,3,0,1,4,2,7,6]Output:
8Hints
1234567