Solution 1 for Scaler Topics Fortnightly Contest - 2
Learn via video course

DSA Problem Solving for Interviews using Java
by Jitender Punia
1000
4.9
This article is part of the Scaler Topics Fortnightly Contest - 2.
Solution Approach
- Traverse the whole array.
- Do xor with each number.
- Count the number of bits differing.
- If number of set bits is higher than C, add this to your answer.
- Return the answer.