title: Count Fibonacci Numbers Given Range Log Time
signature: class Solution {
  
      public Integer countFibonacciNumbersGivenRangeLogTime(Integer low, Integer high) {
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;
  }
question_info.extension: java
question_info.entry_fn_name: countFibonacciNumbersGivenRangeLogTime
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 0, "inputs": {"low": 76, "high": 43}}, {"idx": 1, "outputs": 0, "inputs": {"low": 96, "high": 52}}, {"idx": 2, "outputs": 3, "inputs": {"low": 19, "high": 79}}, {"idx": 3, "outputs": 0, "inputs": {"low": 36, "high": 2}}, {"idx": 4, "outputs": 0, "inputs": {"low": 60, "high": 11}}, {"idx": 5, "outputs": 0, "inputs": {"low": 20, "high": 15}}, {"idx": 6, "outputs": 0, "inputs": {"low": 76, "high": 4}}, {"idx": 7, "outputs": 1, "inputs": {"low": 63, "high": 93}}, {"idx": 8, "outputs": 6, "inputs": {"low": 2, "high": 25}}, {"idx": 9, "outputs": 0, "inputs": {"low": 41, "high": 39}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer low, Integer high, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(low, high,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(76, 43, 0);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(96, 52, 0);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(19, 79, 3);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(36, 2, 0);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(60, 11, 0);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(20, 15, 0);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(76, 4, 0);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(63, 93, 1);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(2, 25, 6);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(41, 39, 0);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer low, Integer high, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(low, high),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__