If anyone thought that They find the recursion hard just try to solve question on pen and paper. You might phase some issues in the beginning but once you start and consistent then you will find that nothing is easier than recursion. And the way of explaining the terms in recursion by fraz bhai makes the recursion super simple. I followed fraz bhai from last year and i find that the way he explain any topic is lit. You must follow their linked list series One of the finest linked list series on youtube
Space complexity = O(N) which is the height of the tree. If we take into account the vector of strings that are also involved, then there are total N! vectors that are required for storing all possible permutations. So recursion stack space complexity = O(N) and N! additional vector space for storing the permutations. By the way, this is a hard topic and you have explained with such easeness that it became quite easy to understand this. Thank you for this good explanation.
Yes, I understood it, I am getting on the track now!! Thank you man your teaching style is so easy to follow up with Thank you again, I am watching you from IRAQ!!
Present #frazbhaii (EP8) ✅ 1st video which i have seen of your is "How I got my OWN house" , later on i have started surfing all your videos with your sister . I use to feel like how lucky is your sister. who has brother like you to guide , support and share tech things ✨🔆 . Then felt like shit man there should be person like him to me also who teaches and guide from scratch .... And then here it's like dream come true You are not only limited to help your sister and siblings but Being humble and kind towards us and helping us . Thank you #frazhaii 💥✨ PS - one request Bhai , please Start giving homework problem pdf . so that even we try to do by ourself
your level of teaching very high for a normal guy to understand all these we had to watch it multiple times. you can improve it by giving some more example .so it saves our times.
Since at any moment we can have N elements of the string in the Recursive stack and we then back-track it , so in my opinion Space Complexity is O(N) . Just completed the videos after giving exams. Although my initial thought was to use a vector check to find which character is chosen or not , but your swapping and i = pos + 1 saved me a ton of extra space complexity!! Thanks a lot for the wonderful explanation
understand now ....what is permutations😍...there is always confusion between subsets or permutations..but now i understand all that things.....thank you fraz bhaiya
Bhaiya this is really nice way that you can swap to get all permutations because till now I always create an empty array of same size and pass it as parameters and then start placing and unplacing the elements in that array which makes the question a little bit easier but I am using extra space and as always amazing explanation bhaiya 🔥👍 TC : O(n*n!) and SC: O(n) as recursion stack can go as deep as the no. of elements are present which is also denoted by pos variable.
The space complexity is O(n) if we ignore the vector data structure used to store possible permutations. Additional n! for storing the possible permutations. so total space complexity = O(n) + O(n!) = O(n) + O(nlogn) = O(nlogn) plzz correct me if i am wrong
Present ! I'm Facing Some issue for Building Logic ! I'm Trying So hard ! But I thought my mind was developed daya by day whenever I watched This Videos ! Thanks a Lot Sir ! Make an Video on Problem Solving Approach on [ Fraz ] Channel ! 🙌✔
space complexity will be O(n) bro, btw, i was not able to get initially the solution but your recursion tree drawing and explanation of that helped, thanks for it and please keep it doing this way, explaining the solution in the end. so that we can grasp it, thanks again bro
Ep 8 is done and this video is much more understandable and much more interesting please make this interest into all videos. And you should make a video about Nodejs projects in web development.
Thanks alot bhaiya to make me fall in love with recursion. Really for the first time I would be able to understand recursion questions & solve it everywhere now......Leetcode, coding ninja & etc.........uh are great teacher as well......Hoping I will be selected in good company now if I would keep following ur all lectures.
Bhaiya let me be honest with you I watched lec-8 completely once again it is of only 20-mins but I wrote the the code on paper and tried to understand it but myself and it took me 1 hr but it was worth it now I understand this completely
Space complexity will be O(n)... I couldn't understand the previous lecture(Ep 7) also the Java code given was wrong ... but I completely understood this one.. thank you for your consistency
Thank you so much Bhaiya For the daily doses you are providing, your lectures are power packed, at first I had some problems in understanding but now I understand everything. Thanks...
your videos and explanation is amezing but today i have little difficult maybe because of stl concept let mr try me things .but keep doing its day 8 of consist watching and coding .than k you
consistency++ agr aap 1 ghante ki length k videos bnaoge toh series placement season se pehle complete ho jegi or follow krne mei v mja aayega consider this
Bhayya please try to explain the recursive tree according to the code written so that it will be more clear , like how the function calling is done and how the recursive functions one by one returns the values
Big bro, you are making us to be consistent with your lectures 😂. Nice explanation with code just did its work. I am excited to do more problems like got some inspiration 🔥. And yes the best giveaway you can arrange is "our placement". Nothing is bigger than that and I am looking forward for it. Love you again ❤️❤️❤️
I have a question about time complexity . It is n *n! Because we are fixing the last element at end. But if we make the base condition such as If(Pos>=str.size() -1) { ans.push_back(str) ; return; } In this case time complexity will be only n! Right? (Ignoring the sorting)
Hey Fraz Bhaiya, please try this method then write code... 1) explain the question 2) draw recursion tree and explain the method to solve 3) lastly write the code... Because when you are writing code from last 3 videos i am not much able to explain it... I am a newbie in cp currently just ended 4th sem, lately discovered cp and working on Java...
space complexity :- O(n) where n is the height of the tree. time complexity will be :- O(n!) because we are not printing it with recursion function. n gets multiplied if we print the string in the base case which is not the case here. We are appending it into a vector in O(1). It takes O(n) time complexity to print a string. And this is the general code for any string to be passed (will also work with duplicate characters) :- #include void permutation(string &str,int n,int i,vector &permut) { if(i==n-1) { permut.push_back(str); return; } else { for(int j=i;j
Bhaiya i understood till lecture 6 very clearly but now I m having bit problem as you used vector syntax from lecture 7 so should I learn vector now and then watch these lectures?
If dry run is also present there, it would be more helpful I guess. But thanks for this great content vaiya,gonna follow up this from today. ❤❤❤ and love your dedication vaiya.
I was finding it difficult initially to understand this one. But later discovered I don't need to know all the iterations of perm(). Shallow understanding does it in recursion. " upar upar se karke nikaljao"
If anyone thought that They find the recursion hard just try to solve question on pen and paper. You might phase some issues in the beginning but once you start and consistent then you will find that nothing is easier than recursion.
And the way of explaining the terms in recursion by fraz bhai makes the recursion super simple.
I followed fraz bhai from last year and i find that the way he explain any topic is lit.
You must follow their linked list series One of the finest linked list series on youtube
Bhai aap Amazon mei job karte ho kya?
@@therealsumitshahwhy?
The meaning of guru ( teacher) is feeled when you teach with hats off dedication
Space complexity = O(N) which is the height of the tree. If we take into account the vector of strings that are also involved, then there are total N! vectors that are required for storing all possible permutations. So recursion stack space complexity = O(N) and N! additional vector space for storing the permutations. By the way, this is a hard topic and you have explained with such easeness that it became quite easy to understand this. Thank you for this good explanation.
Yes, I understood it, I am getting on the track now!!
Thank you man your teaching style is so easy to follow up with
Thank you again, I am watching you from IRAQ!!
Awesome bro....just 1 request plz complete the series.....we all shall stick till the end ❤️
The explanation with recursion tree is simply superb . Got cleared all the doubts . Thank you so much
Present #frazbhaii (EP8)
✅
1st video which i have seen of your is "How I got my OWN house" , later on i have started surfing all your videos with your sister . I use to feel like how lucky is your sister. who has brother like you to guide , support and share tech things ✨🔆 .
Then felt like shit man there should be person like him to me also who teaches and guide from scratch ....
And
then here it's like dream come true
You are not only limited to help your sister and siblings but
Being humble and kind towards us and helping us .
Thank you #frazhaii 💥✨
PS - one request Bhai , please Start giving homework problem pdf . so that even we try to do by ourself
your level of teaching very high for a normal guy to understand all these we had to watch it multiple times. you can improve it by giving some more example .so it saves our times.
#Day_8
Space complexity O(n)
Because of the recursion tree able to understand the problem quickly,Keep going 🌟
#Consistency_OP 🔥🔥🔥
Since at any moment we can have N elements of the string in the Recursive stack and we then back-track it , so in my opinion Space Complexity is O(N) .
Just completed the videos after giving exams. Although my initial thought was to use a vector check to find which character is chosen or not , but your swapping and i = pos + 1 saved me a ton of extra space complexity!! Thanks a lot for the wonderful explanation
EP8 aapki wajah se hamari consistency bhi bn rhi hai daily question kr rhe hai thankyou 🔥🔥
#DSA #recursion #placement #fraz_bhaiya
#ep 8_done
#love_u_vaiya from Bangladesh ❤️❤️
understand now ....what is permutations😍...there is always confusion between subsets or permutations..but now i understand all that things.....thank you fraz bhaiya
The way you explained is just "WOW"
Thanks ☺️😊
It's not about Giveaway, it's about your hardwork and the efforts you are giving for the community 🙂
Bhaiya this is really nice way that you can swap to get all permutations because till now I always create an empty array of same size and pass it as parameters and then start placing and unplacing the elements in that array which makes the question a little bit easier but I am using extra space and as always amazing explanation bhaiya 🔥👍
TC : O(n*n!) and SC: O(n) as recursion stack can go as deep as the no. of elements are present which is also denoted by pos variable.
best video for the recursion on youtube and very easy form to understand
I had missed following videos from past two days but I will be on track
The recursion tree explanation was nice!
Thank you fraz sir to make recursion so much easy😊
Hi brother,i am Rahul this side.... I have watched all ur videos.... They are amazing and so simple to understand, thank you! ❤️❤️
Hey Rahul, thanks a lot for writing this man, really appreciate it ❤️
The space complexity is O(n) if we ignore the vector data structure used to store possible permutations.
Additional n! for storing the possible permutations.
so total space complexity = O(n) + O(n!)
= O(n) + O(nlogn)
= O(nlogn)
plzz correct me if i am wrong
Faraz Bhai you are doing wonderful work with this series... i am going to be consistent, small request to add javascript answers as well. Thanks.
Present ! I'm Facing Some issue for Building Logic ! I'm Trying So hard ! But I thought my mind was developed daya by day whenever I watched This Videos ! Thanks a Lot Sir ! Make an Video on Problem Solving Approach on [ Fraz ] Channel ! 🙌✔
I must say you are every student's inspiration✌️✌️
Sir, I tried to visit other videos but found your best
space complexity will be O(n) bro, btw, i was not able to get initially the solution but your recursion tree drawing and explanation of that helped, thanks for it and please keep it doing this way, explaining the solution in the end. so that we can grasp it, thanks again bro
Beautiful video again bhaiya... Day 8 complete.... Upload consistently... we'll also stay consistent.
Ep 8 is done and this video is much more understandable and much more interesting please make this interest into all videos.
And you should make a video about Nodejs projects in web development.
Thanks alot bhaiya to make me fall in love with recursion. Really for the first time I would be able to understand recursion questions & solve it everywhere now......Leetcode, coding ninja & etc.........uh are great teacher as well......Hoping I will be selected in good company now if I would keep following ur all lectures.
Sure your will ♥️
Fav poet- Ahmed Fraz
Fav Teacher- Mohd Fraz !!
Your efforts are worth it...💯🙋♀️Thankyou bhaiya! For making me understand these questions. WAITING FOR NEXT VIDEO
Bhaiya let me be honest with you I watched lec-8 completely once again it is of only 20-mins but I wrote the the code on paper and tried to understand it but myself and it took me 1 hr but it was worth it now I understand this completely
Thankyou bhaiya for sharing your knowledge for free it was great learning from you
I wait for your lecture video daily
Day 8✌✌ Got stuck in other works, still managed to complete this✌✌ thanks for the video
Ep 8 successfully ✅,space complexity is O(n!).your videos are always very good.
Thanks! 😃
Space complexity will be O(n)... I couldn't understand the previous lecture(Ep 7) also the Java code given was wrong ... but I completely understood this one.. thank you for your consistency
JazakAllah Bhaiya
Love your videos
Best lecture on this problem
Keeping posting such quality videos ❤️👏
Thank you so much Bhaiya For the daily doses you are providing, your lectures are power packed, at first I had some problems in understanding but now I understand everything. Thanks...
That's so good bro
Thanks for writing ❤️
Very clear explanation...Thanks for providing such a nice course🥰💯
i am following all yrr lecture ... u r awsm sir jiiiiii
Sorry for being late to reply on this video sir I was busy yesterday but now I'll daily follow these videos . Nice content and explanation sir ❤️❤️❤️
Thanks Chirag
completed video and it was full of learning, TQ..
Thanks bhaiya for your valuable lectures
This one is awesome🔥🔥
thanks for ur consistency in videos
your videos and explanation is amezing but today i have little difficult maybe because of stl concept let mr try me things .but keep doing its day 8 of consist watching and coding .than k you
Thankyou fraz for making this nice content. It will help a lot of students
sir please annotate the concept while coding this will more helpful sometime we stuck in imagination that how things are works
Thanks bhaiya for providing us this great content
Done Understood ❤️✅
Nicely explained #Fraz
Bohot badiaa 🔥🔥
Can you please talk more about the backtracking step while explaining the recursion tree.
Space complexity - O(N)
Time complexity - N log N
i found it difficult but ur explaination is superb
Nice explanation sir .... thank you so much
consistency++
agr aap 1 ghante ki length k videos bnaoge toh series placement season se pehle complete ho jegi or follow krne mei v mja aayega
consider this
Thankyou bhaiya for this session
Bhayya please try to explain the recursive tree according to the code written so that it will be more clear , like how the function calling is done and how the recursive functions one by one returns the values
Big bro, you are making us to be consistent with your lectures 😂. Nice explanation with code just did its work. I am excited to do more problems like got some inspiration 🔥. And yes the best giveaway you can arrange is "our placement". Nothing is bigger than that and I am looking forward for it. Love you again ❤️❤️❤️
Thanks a lot bro
bhaiya ye summer vacation aapke dsa couse ke nam,i hope that after 2 month we are master of dsa🥰🥰
nice explanation keep up the good work.
EP 8 Completed and I'm back on the track. Sem exams are going tough but I'm not going to break my DSA consistency till the end❤
I have a question about time complexity .
It is n *n! Because we are fixing the last element at end. But if we make the base condition such as
If(Pos>=str.size() -1) {
ans.push_back(str) ;
return;
}
In this case time complexity will be only
n! Right? (Ignoring the sorting)
Complete Day 8❤️
Consistency regular with motivation 🥰
I think I ignore simple logic instead of your greate recursion logic of every problem.
watched till end 👍
Hey Fraz Bhaiya, please try this method then write code...
1) explain the question
2) draw recursion tree and explain the method to solve
3) lastly write the code...
Because when you are writing code from last 3 videos i am not much able to explain it... I am a newbie in cp currently just ended 4th sem, lately discovered cp and working on Java...
sir sorting, stack,queue etc. ye sb topics bhi cover krenge na aap??
8th lecture done ,just cant wait for next video to do more questions.
Great video bro
ep.8 completed ...thanks a lot sir !!
Thanks Bhai for helping us 🙏
Thanks sir
Awesome fraz and its clear but can you please dry run through code once at last for better undestnding ❤️
Noted
space complexity :- O(n) where n is the height of the tree.
time complexity will be :- O(n!) because we are not printing it with recursion function. n gets multiplied if we print the string in the base case which is not the case here. We are appending it into a vector in O(1). It takes O(n) time complexity to print a string.
And this is the general code for any string to be passed (will also work with duplicate characters) :-
#include
void permutation(string &str,int n,int i,vector &permut)
{
if(i==n-1)
{
permut.push_back(str);
return;
}
else
{
for(int j=i;j
EP-8 Completed 🤘
Amazing 👏 bhai hasmap aur heaps bhi padha dena thoda beginner level bhi dekh lo
thanks a lot sir🤞🤞
Bhaiya i understood till lecture 6 very clearly but now I m having bit problem as you used vector syntax from lecture 7 so should I learn vector now and then watch these lectures?
Bawall🔥🔥🔥❤️❤️❤️
Ep8 also done successfully ✅
12:00 thank u for this its really helpful for me
Thanks for writing
super bhaia ,,,nice
Just keep going. Really amazing series 😉
umm this is what i wanted to learn ❤️
day 8 done
You are just amazing
If dry run is also present there, it would be more helpful I guess. But thanks for this great content vaiya,gonna follow up this from today. ❤❤❤ and love your dedication vaiya.
Can you traverse thorugh code so that we can understand what is going on inside loop and backtracking step.
Please do this and I am watching the video second time for better understanding. If you traverse through code and explain it goes perfect bro 😊
Love you sir 💓
Very nice lecture
👍👍🔥🔥
Nice Video Sir
Difficulty level is increasing slowly
I was finding it difficult initially to understand this one. But later discovered I don't need to know all the iterations of perm(). Shallow understanding does it in recursion. " upar upar se karke nikaljao"
Thanks bhaiya 😄😄
❤️❤️ thankyou sir.
Bahiya when will you organise coding contest?
Very soon
Thanku Soo much bhiya 💫
good job bhaiaya i like third year student cse