Python Programming Practice: LeetCode #70 -- Climbing Stairs

preview_player
Показать описание
In this episode of Python Programming Practice: LeetCode #70 -- Climbing Stairs.

Link to the problem here:

Python Programming Practice is a series focused on teaching practical coding skills by solving exercises on popular coding websites. Note that the solutions seen here may not be the most efficient possible.

I am not going to provide the full code in the video description for this series, since copy and pasting solutions is not in the spirit of doing coding exercises. It is intended that the video will help you think about problems, approaches and how to structure solutions so that you are able to code up a working solution yourself. .

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

I watched several videos about this problem. I think your way is the most intuitive one. Very easy to understand and memorize. Great job, DataDaft! I gave it and huge thumb up and subscribed to your channel!

leiwang
Автор

Thank you! clear and intuitive solution.

jeffjames
Автор

Great solution and thoroughly explained. This was the video that clicked for me! Thanks!

rkwongmusic
Автор

Recursion should work here too (with memoization)

mryup
Автор

5:41 I don't quite understand why fun(2) + fun(3) can lead to fun(4), though I do see clearly the sum of two values equals the possiblities of 4 stairs.

cydia
Автор

So the solution was a fibonacci sequence

OutOfHomeHere