function to sort the array according to the number of set bits in elements
def sortArr ( arr , n ) : NEW_LINE INDENT mp = [ ] NEW_LINE for i in range ( n ) : NEW_LINE INDENT count = 0 NEW_LINE k = arr [ i ] NEW_LINE DEDENT DEDENT