Dsa
Hashing
Warm-up
Find Missing Numbers
You are given a list of N integers ranging from 1 to N, but one or more numbers are missing. Your task is to find the missing numbers.
Input format:
- The first line contains an integer N (1 ≤ N ≤ 1000), the total range.
- The second line contains N-1 integers, the actual numbers present. Each number is between 1 and N.
Output format:
- A space-separated string of missing numbers in ascending order.
Example Input:
5
2 3 1 5
Example Output:
4
Key concepts
hashingsetsmath
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