title: Find Whether A Given Number Is A Power Of 4 Or Not 2
signature: pub fn find_whether_a_given_number_is_a_power_of_4_or_not_2(n: i32) -> bool {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: bool, expected: bool)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: bool)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        1, 
        true
      ));
      
      println!("TEST-1...{}", driver(
        4, 
        true
      ));
      
      println!("TEST-2...{}", driver(
        64, 
        true
      ));
      
      println!("TEST-3...{}", driver(
        -64, 
        false
      ));
      
      println!("TEST-4...{}", driver(
        128, 
        false
      ));
      
      println!("TEST-5...{}", driver(
        1024, 
        true
      ));
      
      println!("TEST-6...{}", driver(
        97, 
        false
      ));
      
      println!("TEST-7...{}", driver(
        86, 
        false
      ));
      
      println!("TEST-8...{}", driver(
        14, 
        false
      ));
      
      println!("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 );
  }