I attempted to make better Fibonacci sequence calculation algorithm in C++. This was the best I could:constexpr unsigned fibonacci(unsigned n) {    unsigned result[2] = {1, 0};    for (unsigned i = 1; i < n; ++i)        result[i%2] = result[0] + result[1];    return result[1 - n%2];}...which runs at O(n) time complexity and O(1) space complexity.Is there any better?
Better Fibonacci sequence calculation
c++;c++11;fibonacci sequence