← Nvidia questions
CodingReported in a candidate post, Mar 2024

Find the missing number in an array and optimize it

Filed under Nvidia

An array contains n distinct numbers taken from the range 0..n, so exactly one number is missing. Return the missing number, first with a simple approach and then optimise it for time and space.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Nvidia questions

Collected from public candidate posts and coding forums. Updated Nov 2026.