Philips Innovation Campus OA (2022) | Combinatorics & Binary Search | On-Campus
Question · Posted Jun 2026
Question: Two Set Bits Problem Statement Look at the following sequence: 3, 5, 6, 9, 10, 12, 17, 18, 20.... All the numbers in the series have exactly 2 bits set in their binary representation. Your task is simple, you have to find the N-th number of this sequence. Input Format The first line of input contains T - the number of test cases. It's followed by T lines, each containing a single number N. Output Format For each test ...
The full answer & interview discussion are available to premium members.
Log in Create a free account