2 liner JAVA solution


  • 0
    T
    class Solution {
        public boolean isPowerOfFour(int num) {
            if(Math.log(num)/Math.log(4)%1 == 0) {
                return true;
            }
            return false;
        }
    }

Log in to reply
 

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