title: Find Whether A Given Number Is A Power Of 4 Or Not 2
signature: def findWhetherAGivenNumberIsAPowerOf4OrNot2(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Boolean , expected: Boolean): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Boolean): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        1, 
        true    
      )}")   
  
  
      println(s"TEST-1...${driver(
        4, 
        true    
      )}")   
  
  
      println(s"TEST-2...${driver(
        64, 
        true    
      )}")   
  
  
      println(s"TEST-3...${driver(
        -64, 
        false    
      )}")   
  
  
      println(s"TEST-4...${driver(
        128, 
        false    
      )}")   
  
  
      println(s"TEST-5...${driver(
        1024, 
        true    
      )}")   
  
  
      println(s"TEST-6...${driver(
        97, 
        false    
      )}")   
  
  
      println(s"TEST-7...${driver(
        86, 
        false    
      )}")   
  
  
      println(s"TEST-8...${driver(
        14, 
        false    
      )}")   
  
  
      println(s"TEST-9...${driver(
        99, 
        false    
      )}")   
  
  }
  
source_py: def find_whether_a_given_number_is_a_power_of_4_or_not_2(n):
      return ((n != 0) and ((n & (n - 1)) == 0) and (not (n & 2863311530)))
source_cpp: bool find_whether_a_given_number_is_a_power_of_4_or_not_2(unsigned int n) {
    return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) && ! ( n & 0xAAAAAAAA );
  }