Back to DSA sheet

Missing Number

EasyBit Manipulation
Open on LeetCodeAmazonGoogleMicrosoft

An array contains n distinct numbers from the range [0, n]. Return the one number in the range that is missing.

Constraints
  • 1 <= n <= 10^4
  • All numbers are distinct
Sheets
Blind 75Grind 75NeetCode 150NeetCode 250
missing-number.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.