Given an integer say and you need to find the following the number of set bits. This problem is a variation of standard 2 Sum problems.