One line python


  • 0
    V

    '''
    class Solution(object):

    def isPowerOfTwo(self, n):
    
        return True if n > 0 and bin(n).count('1') == 1 else False
    

    '''


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.