Fibonacci Numbers Magic (LeetCode 509) | Full solution | Golden Ratio | Representation | Examples

preview_player
Показать описание

Chapters:
00:00 - Intro
01:02 - Problem statement and description
02:41 - Fibonacci Series
06:03 - Efficient solution (Memoization)
08:09 - Dry-run of Code
09:52 - Representation of Fibonacci Sequence
13:15 - Golden Ratio
16:25 - Final Thoughts

📚 Links to topics I talk about in the video:

📖 Reference Books:

🎥 My Recording Gear:

💻 Get Social 💻

#leetcode #programming #magic
Рекомендации по теме
Комментарии
Автор

Amazing. Based on your idea of using temp variable instead of an array, I have written the following code
class Solution {
public int fib(int n) {
if(n<=1)
return n;
int temp0 = 0;
int temp1 = 1;
int temp =0;
for(int i=2;i<=n;i++)
{
temp = temp0 + temp1;
temp0 = temp1;
temp1 = temp;
}
return temp;

}
}

jjoelthomas
Автор

Great learning as always. Lucky that I found this channel

souvikmukherjee
Автор

Golden Ratio, That's amazing and your explanation also 💥

fahimx
Автор

Amazing explaination. Thank you :)
Started loving the golden ratio :)

anushasthanam
Автор

please keep on going! I love ur teaching style!

aayushpatel
Автор

highly underated chanell on utbe...great explanation

teju
Автор

Awesome video
Thanks bhai your channel has been very helpful in DSA preparation

farhanali
Автор

Your channel is a blessing. I actually solved the solution with the O(1) on leetcode and watched your video to find a better solution and/or check my solution. Your videos have shaped up my thought process recently immensely I can say after this experience!

To everyone starting new to solving leetcode problems, don't give up! Practice will definitely make you improve (in addition to watching this channel of course! ;) )

untitleduntitled
Автор

Fabulous bro, It’s really amazing, you explained in fantastic ways, loved it❤

dheerajsharma
Автор

Awesome explanation. Can you please provide solutions using Javascript

raviaryan
Автор

nice explanation, can you do Leetcode 207 - Course Schedule

NavneetKrishna