title: Height Complete Binary Tree Heap N Nodes
signature: heightCompleteBinaryTreeHeapNNodes(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int 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(
          65, 
          6)
      }");
  
      print("TEST-1...${driver(
          94, 
          6)
      }");
  
      print("TEST-2...${driver(
          52, 
          5)
      }");
  
      print("TEST-3...${driver(
          31, 
          4)
      }");
  
      print("TEST-4...${driver(
          9, 
          3)
      }");
  
      print("TEST-5...${driver(
          1, 
          0)
      }");
  
      print("TEST-6...${driver(
          41, 
          5)
      }");
  
      print("TEST-7...${driver(
          98, 
          6)
      }");
  
      print("TEST-8...${driver(
          45, 
          5)
      }");
  
      print("TEST-9...${driver(
          24, 
          4)
      }");
  
      return 0;
  }
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;
  }