Fibonacci Sequence - Dynamic Programming | C++ Placement Course | Lecture 35.2

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Bhaiya who is teaching in this video is not a good teacher. He does not explains concept well. Bring someone else to teach dp series. Please 🙏

arijitanand
Автор

#include<bits/stdc++.h>
main()
{
int n;std::cin>>n;
std::vector<int>dp(n+1);
dp[0]=0, dp[1]=0, dp[2]=1;
for(int i=3; i<=n; i++)
dp[i]=dp[i-1]+dp[i-2];
std::cout<<dp[n];
}

md.touhidulislam
Автор

You can just use 2-3 variables instead of array of dp[], TC- O(n) SC - O(1)

dj-vwim
Автор

Wahh bhaiya moz krdi
Wah bhaiyyyaaaa wahhh

mukulchopra
Автор

Matlab kya hai ye, kuch bhi nahi samzaya direct code, vo to ham gfg pe bhi dekh sakte hai, koi sense hai is bat ka bato

vishalkhedekar
Автор

Boleto sir, Ekdam dimag mein bhai th gaya

yashubale
Автор

bhaiya ji thoda itne fast hote to aapse sikhne nhi aate

thehelpinghands
Автор

Pehele khud samjho fir hume samjhao Rishubh gupta 🗣🗣🗣🗣🗣

tit-tiwarianurag
Автор

everything was good except f1=0 (f1=1).

AmitRaj-yynn
Автор

Eliminate 3rd if correct Output of 8 is 21****

shubhamsonarikar
Автор

Bhai web development ke further videos kab aaege please reply

lokeshpandey
Автор

Fibbpnachi bubble hain 😁sari mushkil ka hal 😅😅😅😅😅

anilkumarsharma
Автор

Why we can't just take 1e3 and not add 2 to it??

rahul_ji
Автор

Apney customer subscribe wale ko har din ek bada tablet gift🎁 kar do sari duniya following karega🤣🤣🤣🤣

anilkumarsharma
Автор

It still doesn't gives a correct output for 50?

hannanafridi
Автор

mujhe ab pata chala ki me tabulation use karta tha fib ke liye, balki uski mujhe koi idea nahi thi pehle

saurabhnehe
Автор

Bhai approach nahi Bata raha sahi se ....thoda aur explain karna tha dp is not a topic which taught on PPT ..

nitishsingh
Автор

Web development course ke notes upload karo

Lalit_Shirsath
Автор

kuch samjh nhi aya why make it so difficult :(

pratyushvashisht
Автор

Ek artificial intelligence🤖🤖 ka calculator development board banva do economy 📈📈📈apkey following karegi
🤣🤣🤣🤣🤣🤣

anilkumarsharma
visit shbcf.ru