• + 7 comments

    Solved it by using Binet's formular and fast doubling. This approach is more memory effecient than memorising the entire Fibonacci sequence in your data structure. Speed-wise I am getting an average of 0.14 sec for all test cases in C.