title: Height Complete Binary Tree Heap N Nodes
signature: def heightCompleteBinaryTreeHeapNNodes(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Int): 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(
        65, 
        6    
      )}")   
  
  
      println(s"TEST-1...${driver(
        94, 
        6    
      )}")   
  
  
      println(s"TEST-2...${driver(
        52, 
        5    
      )}")   
  
  
      println(s"TEST-3...${driver(
        31, 
        4    
      )}")   
  
  
      println(s"TEST-4...${driver(
        9, 
        3    
      )}")   
  
  
      println(s"TEST-5...${driver(
        1, 
        0    
      )}")   
  
  
      println(s"TEST-6...${driver(
        41, 
        5    
      )}")   
  
  
      println(s"TEST-7...${driver(
        98, 
        6    
      )}")   
  
  
      println(s"TEST-8...${driver(
        45, 
        5    
      )}")   
  
  
      println(s"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;
  }