title: Count Fibonacci Numbers Given Range Log Time
signature: def countFibonacciNumbersGivenRangeLogTime(low: Int, high: 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(low: Int, high: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(low, high),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        76, 43, 
        0    
      )}")   
  
  
      println(s"TEST-1...${driver(
        96, 52, 
        0    
      )}")   
  
  
      println(s"TEST-2...${driver(
        19, 79, 
        3    
      )}")   
  
  
      println(s"TEST-3...${driver(
        36, 2, 
        0    
      )}")   
  
  
      println(s"TEST-4...${driver(
        60, 11, 
        0    
      )}")   
  
  
      println(s"TEST-5...${driver(
        20, 15, 
        0    
      )}")   
  
  
      println(s"TEST-6...${driver(
        76, 4, 
        0    
      )}")   
  
  
      println(s"TEST-7...${driver(
        63, 93, 
        1    
      )}")   
  
  
      println(s"TEST-8...${driver(
        2, 25, 
        6    
      )}")   
  
  
      println(s"TEST-9...${driver(
        41, 39, 
        0    
      )}")   
  
  }
  
source_py: def count_fibonacci_numbers_given_range_log_time(low, high):
      (f1, f2, f3) = (0, 1, 1)
      result = 0
      while (f1 <= high):
          if (f1 >= low):
              result += 1
          f1 = f2
          f2 = f3
          f3 = (f1 + f2)
      return result
source_cpp: int count_fibonacci_numbers_given_range_log_time(int low, int high) {
    int f1 = 0, f2 = 1, f3 = 1;
    int result = 0;
    while ( f1 <= high ) {
      if ( f1 >= low ) result ++;
      f1 = f2;
      f2 = f3;
      f3 = f1 + f2;
    }
    return result;
  }