Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Let's Connect 🤝 :LinkedIn : www.linkedin.com/in/rochak-vyas17/Code : class Solution{ public: int nthStair(int n){ int dp[n+1]; dp[1]=1; dp[2]=2; for(int i=3;i
return int(n/2) +1
Yeah this can also work
your solution ok but for longer run learn the dp variation that is the take from the problem
Let's Connect 🤝 :
LinkedIn : www.linkedin.com/in/rochak-vyas17/
Code :
class Solution{
public:
int nthStair(int n){
int dp[n+1];
dp[1]=1;
dp[2]=2;
for(int i=3;i
return int(n/2) +1
Yeah this can also work
your solution ok but for longer run learn the dp variation that is the take from the problem