Question bank › Bit Manipulation
Dsa Bit Manipulation Medium

Unique Binary Mask

Given a list of N integers, write a program that generates a binary mask based on the uniqueness of the integers. Each position in the mask should be set to 1 if that integer is unique in the list, and 0 otherwise. Input format: - The first line contains an integer N (1 <= N <= 100). - The second line contains N space-separated integers. Output format: - A binary mask in the form of a string of '0's and '1's. Example: Input: 5 1 2 2 3 4 Output: 10010

Key concepts

bitmanipulationuniqueness

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.