title: Height Complete Binary Tree Heap N Nodes
signature: pub fn height_complete_binary_tree_heap_n_nodes(n: i32) -> i32 {
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: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        65, 
        6
      ));
      
      println!("TEST-1...{}", driver(
        94, 
        6
      ));
      
      println!("TEST-2...{}", driver(
        52, 
        5
      ));
      
      println!("TEST-3...{}", driver(
        31, 
        4
      ));
      
      println!("TEST-4...{}", driver(
        9, 
        3
      ));
      
      println!("TEST-5...{}", driver(
        1, 
        0
      ));
      
      println!("TEST-6...{}", driver(
        41, 
        5
      ));
      
      println!("TEST-7...{}", driver(
        98, 
        6
      ));
      
      println!("TEST-8...{}", driver(
        45, 
        5
      ));
      
      println!("TEST-9...{}", driver(
        24, 
        4
      ));
      
  }
source_py: def height_complete_binary_tree_heap_n_nodes(N):
      return (math.ceil(math.log2((N + 1))) - 1)
source_cpp: int height_complete_binary_tree_heap_n_nodes(int N) {
    return ceil ( log2 ( N + 1 ) ) - 1;
  }