How to find the nth Fibonacci number using recursion in any programming language | Full explanation

preview_player
Показать описание
hey, coders so today I am going to tell you that how can you find the nth fibonacci number using any programming/coding language (python, java, c , c++).
this video gives a deep concept understanding to this topic.
content in the video:
0:00 intro.
0:18 what is fibonacci and how to find nth fibonacci?
3:12 how a function evaluates the nth fibonacci number?
7:07 coding our fibonacci function.
10:18 outro.

code used in this video:

def fib(n):
if n == 1:
return 0
elif n == 2:
return 1
return fib(n-1) + fib(n-2)

print(fib(5))

If you found this video helpful then don't forget to like the video and if you have any doubts then comment down below and I will surely reply to all your comments.

Thank you for watching the video.
Рекомендации по теме
Комментарии
Автор

Really good videos it helped me understand Fibonacci

prajith
Автор

I watched this topic-related video but didn't understand.
watching this video, my concept is clear.

programming_camp
join shbcf.ru