Search
⌘K

Leetcode 268. Missing Number

Given an array of n distinct numbers from the range [0, n], find the single number in that range that is missing from the array. Aim for an O(n) time, O(1) extra-space solution (e.g., using arithmetic sum or XOR properties).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.