Print first N fibonacci number || 17 sep gfg potd || #gfgdailyproblem

preview_player
Показать описание
#SCODESam #gfg #problemoftheday

Here is the Solution video of the Problem of the day.
If you understood the solution please make sure to subscribe the channel and hit the like button .
-----------------------------------------------------------------------------------------------------
POTD QUESTION LINK:-
-----------------------------------------------------------------------------------------------------
JOIN OUR TELEGRAM COMMUNITY :-
-----------------------------------------------------------------------------------------------------
#gfgpotdtoday
#gfgdailyproblem
#today gfg problem solution
#easy explain gfg potd today
gfg potd
gfg potd today
potd
gfg
gfg problem of the day
Problem of the Day
Print first N fibonacci number
print first N fibonacci number
Print first N fibonacci number
Print first N fibonacci number gfg potd
Print first N fibonacci number
Print first N fibonacci number
problem of the day
Print first N fibonacci number
Print first N fibonacci number 17 august potd
17 september gfg potd
17 september gfg
17 september
C++, Java, Python
gfg potd today
today gfg potd
potd gfg solution today

gfg, gfg potd, gfg POTD gfg,potd today gfg, today potd, gfg today, gfg today potd,
sep potd,


#gfg #problemoftheday #gfgpotd #gfgpractice
#SCODESam
#leetcode
#coders
#POTD
#github
#share #like #Subscribe #comment

companies:-
#Paytm #Flipkart #MorganStanley #Accolite #Amazon #Microsoft #Samsung
#Hike #MakeMyTrip #Ola #Cabs #Oracle #Walmart #Goldman #Sachs #Directi #Intuit #SAP #Labs #Quikr #Facebook #Salesforce #Pubmatic #Sapient #Swiggy

#SCODESam #dsa #programming #gfg #gfgpotd #problemsolving #coding #softwareengineer #faang #dsa #amazon #microsoft #competitiveprogramming #dsasheet #interviewpreparation #gfg #gfg_potd #problemoftheday #today #gfgtoday

#programming
#coding
#computerscience
#codinglife
#tech
#algorithm
#datastructures
#leetcode
#hackerrank
#geeksforgeeks
#interviewprep
#codenewbie
#learnprogramming
#codegoals

#microsoft #Amazon #amazon #flipkart #google #deshaw #adobe #morgan #stanley
#morganstanley #Samsung #oyo #visa #Accolite
Рекомендации по теме
Комментарии
Автор

solution ->
class Solution
{
public:
vector<long long> printFibb(int n)
{
if(n==1)return {1};
if(n==2)return {1, 1};
vector<long long>ans;
long long num1=1;
long long num2=1;
ans.push_back(num1);
ans.push_back(num2);
for(int i=3;i<=n;i++){
long long curr=num1+num2;
ans.push_back(curr);
num1=num2;
num2=curr;
}
return ans;
}
};

SCODESam