Space complexity

no discussion about space complexity

Hi @dheerajmishra992,
In the recursive fibonacci number the space complexity is constant … Or in other ways you can say it is O(1) . (big-oh(1)) This is because each recursive call uses almost no extra memory … You can also rewrite the function fibonacci number to not use any int constant to store the data.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.