Hey! My name is Tomas. Thanks for checking out my channel.
Problem
LeetCode 70. Climbing Stairs
https://leetcode.com/problems/climbing-stairs/description/
GitHub Solution
https://github.com/R-Tomas-Gonzalez/github/tree/main/0070-climbing-stairs
Notes
SUBPROBLEMS
We can either climb 1 or 2 stairs
Essentially this comes down to a dp problem.
Because it's a fib problem
[ 1, 2, 3, 5, 8, 13]
2 stairs = 2
1 + 1
2
3 stairs = 3
1 + 1 + 1
2 + 1
1 + 2
4 stairs = 5
2 + 2
2 + 1 + 1
1 + 1 + 2
1 + 2 + 1
1 + 1 + 1 + 1
5 stairs = 8
1 + 1 + 1 + 2
1 + 1 + 2 + 1
1 + 2 + 1 + 1
2 + 1 + 1 + 1
1 + 1 + 1 + 1 + 1
2 + 2 + 1
1 + 2 + 2
2 + 1 + 2
• Connect with me on LinkedIn: https://www.linkedin.com/in/rtomasgonzalez/
• Connect with me on GitHub: R-Tomas-Gonzalez (Tomas Gonzalez)
Happy Coding!