Find numbers with more than k-bits in their binary representations

Given an array of unsigned integers, print all the numbers that have more than k bits set in their binary representation. For example, if k = 2, and input array is: int arr[] = {2, 1, 15, 9, 7, 14, 32, 127}; Then the output should be: 15 7 14 127 Because all of these […]
 •  0 comments  •  flag
Share on Twitter
Published on May 28, 2018 04:53
No comments have been added yet.