Zomato may use sequence calculations in experimentation and ranking components. Implement a function that returns the nth Fibonacci number and supports recursive, iterative, and memoized strategies.
Use the definition F(0) = 0, F(1) = 1, and F(n) = F(n - 1) + F(n - 2) for n >= 2.
Implement fibonacci(n, method), where n is a non-negative integer and method is one of "recursive", "iterative", or "memoized". Return the integer F(n). Do not use external libraries or floating-point arithmetic.
The implementation must make the strategy choice explicit. The recursive version should directly reflect the recurrence, the iterative version should use constant auxiliary space, and the memoized version should avoid recomputing subproblems.
def fibonacci(n, method):