title: Find Index Given Fibonacci Number Constant Time
signature: function findIndexGivenFibonacciNumberConstantTime(n) {
source_py: def find_index_given_fibonacci_number_constant_time(n):
      if (n <= 1):
          return n
      a = 0
      b = 1
      c = 1
      res = 1
      while (c < n):
          c = (a + b)
          res = (res + 1)
          a = b
          b = c
      return res
source_cpp: int find_index_given_fibonacci_number_constant_time(int n) {
    if ( n <= 1 ) return n;
    int a = 0, b = 1, c = 1;
    int res = 1;
    while ( c < n ) {
      c = a + b;
      res ++;
      a = b;
      b = c;
    }
    return res;
  }