title: Find Whether A Given Number Is A Power Of 4 Or Not 1
signature: findWhetherAGivenNumberIsAPowerOf4OrNot1(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(bool actual, bool expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, bool expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          1, 
          true)
      }");
  
      print("TEST-1...${driver(
          4, 
          true)
      }");
  
      print("TEST-2...${driver(
          64, 
          true)
      }");
  
      print("TEST-3...${driver(
          -64, 
          false)
      }");
  
      print("TEST-4...${driver(
          128, 
          false)
      }");
  
      print("TEST-5...${driver(
          1024, 
          true)
      }");
  
      print("TEST-6...${driver(
          45, 
          false)
      }");
  
      print("TEST-7...${driver(
          33, 
          false)
      }");
  
      print("TEST-8...${driver(
          66, 
          false)
      }");
  
      print("TEST-9...${driver(
          74, 
          false)
      }");
  
      return 0;
  }
source_py: def find_whether_a_given_number_is_a_power_of_4_or_not_1(n):
      count = 0
      if (n and (not (n & (n - 1)))):
          while (n > 1):
              n >>= 1
              count += 1
          if ((count % 2) == 0):
              return True
          else:
              return False
source_cpp: bool find_whether_a_given_number_is_a_power_of_4_or_not_1(unsigned int n) {
    int count = 0;
    if ( n && ! ( n & ( n - 1 ) ) ) {
      while ( n > 1 ) {
        n >>= 1;
        count += 1;
      }
      return ( count % 2 == 0 ) ? 1 : 0;
    }
    return 0;
  }