Question bank › Bit Manipulation
Dsa Bit Manipulation Medium

Find Missing Number in Sequence

You are given an array of integers containing numbers from 1 to n with one number missing. Use bit manipulation to find that missing number. Input format: The first line contains an integer n (1 <= n <= 10^6). The second line contains n-1 space-separated integers representing the array. Output format: Print the missing number. Example: Input: 5 1 2 3 5 Output: 4

Key concepts

bit_manipulationsequence

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.