Question bank › Arrays
Dsa Arrays Easy

Missing Number Finder

You are given an array containing n distinct integers in the range of 0 to n. One of the numbers in this range is missing from the array. Your task is to find the missing number. The input format is as follows: Input: - The first line contains a single integer n (1 <= n <= 1000) - the number of elements in the array. - The second line contains n space-separated integers, the elements of the array. Output: - Print the missing number. Example: Input: 5 0 1 2 3 5 Output: 4

Key concepts

arrayshashingsearching

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.