Why it is showing the error

this errror comes when compiler takes more than 3 second to compute ans

this recursive algorithm for fibonacci nos will run roughly till n=25
Time complexity of you approach is 2^n
as it include many overlaping subproblems so this error will come

use dp or iterative approach to solve problem

I hope you understand

Note Mention appropriate topic
here you ask for fibonacci series but tagged build-bst