Google LOVES Dynamic Programming Questions! Climbing Stairs - Leetcode 70

preview_player
Показать описание
Google LOVES Dynamic Programming Questions! Climbing Stairs - Leetcode 70

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

We don't need the additional list as we only need the number of ways to reach the last 2 stairs thus we only need 2 variables

aritra
Автор

Just 3 to 4 minutes solve this climbing stairs problem but use to JavaScript ❤

CodeNova-w
Автор

It's comes across as a bit of a truth table

domm
Автор

The space complexity here is terrible, using two variables a=1 and b=2 and adjusting it values for every iteration it can be O(1). Very similar to the factorial algo.

RainerArencibia
welcome to shbcf.ru