C++ 1 line solution


  • 3

    "Please provide more information - at least 30 characters"

        return n<=0? false: !(n&(n-1));
    

    over


Log in to reply
 

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