Ep8 - Find all the permutations of an array | Recursion | DSA series | Codes in description.

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 186

  • @amazonjobs5000
    @amazonjobs5000 2 роки тому +18

    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

  • @coderszen397
    @coderszen397 2 роки тому +1

    The meaning of guru ( teacher) is feeled when you teach with hats off dedication

  • @ranitbandyopadhyay
    @ranitbandyopadhyay 2 роки тому +3

    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.

  • @muntadher8087
    @muntadher8087 Рік тому +1

    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!!

  • @ashrafmohammad2784
    @ashrafmohammad2784 2 роки тому +4

    Awesome bro....just 1 request plz complete the series.....we all shall stick till the end ❤️

  • @laharimanda2691
    @laharimanda2691 2 роки тому +1

    The explanation with recursion tree is simply superb . Got cleared all the doubts . Thank you so much

  • @DeviKumavath
    @DeviKumavath 2 роки тому +6

    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

  • @jayantmishra6897
    @jayantmishra6897 2 роки тому

    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.

  • @avadhutlohar5181
    @avadhutlohar5181 2 роки тому +7

    #Day_8
    Space complexity O(n)
    Because of the recursion tree able to understand the problem quickly,Keep going 🌟
    #Consistency_OP 🔥🔥🔥

  • @arghya_0802
    @arghya_0802 2 роки тому

    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

  • @amanbhojak8281
    @amanbhojak8281 2 роки тому

    EP8 aapki wajah se hamari consistency bhi bn rhi hai daily question kr rhe hai thankyou 🔥🔥

  • @emtiazahmed5333
    @emtiazahmed5333 2 роки тому

    #DSA #recursion #placement #fraz_bhaiya
    #ep 8_done
    #love_u_vaiya from Bangladesh ❤️❤️

  • @mukeshkir1991
    @mukeshkir1991 2 роки тому

    understand now ....what is permutations😍...there is always confusion between subsets or permutations..but now i understand all that things.....thank you fraz bhaiya

  • @satyammishra6356
    @satyammishra6356 2 роки тому +1

    The way you explained is just "WOW"

  • @ayushKumar-9835
    @ayushKumar-9835 2 роки тому +1

    It's not about Giveaway, it's about your hardwork and the efforts you are giving for the community 🙂

  • @Sandeep-zd6dq
    @Sandeep-zd6dq 2 роки тому +1

    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.

  • @rishabhjagariya2828
    @rishabhjagariya2828 2 роки тому

    best video for the recursion on youtube and very easy form to understand

  • @sowmi3084
    @sowmi3084 2 роки тому

    I had missed following videos from past two days but I will be on track

  • @divyanshsagar
    @divyanshsagar 2 роки тому

    The recursion tree explanation was nice!

  • @abhi_coder6
    @abhi_coder6 Рік тому +1

    Thank you fraz sir to make recursion so much easy😊

  • @tech_wizard9315
    @tech_wizard9315 2 роки тому

    Hi brother,i am Rahul this side.... I have watched all ur videos.... They are amazing and so simple to understand, thank you! ❤️❤️

    • @LearnYardYT
      @LearnYardYT  2 роки тому

      Hey Rahul, thanks a lot for writing this man, really appreciate it ❤️

  • @aasifali9139
    @aasifali9139 2 роки тому +1

    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

  • @shivamsrivastava8093
    @shivamsrivastava8093 2 роки тому

    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.

  • @shalimar_mehra
    @shalimar_mehra 2 роки тому +2

    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 ! 🙌✔

  • @singla__sisters2928
    @singla__sisters2928 2 роки тому

    I must say you are every student's inspiration✌️✌️

  • @ABHISHEKKUMAR-ns6om
    @ABHISHEKKUMAR-ns6om 2 роки тому

    Sir, I tried to visit other videos but found your best

  • @gouravmehra007
    @gouravmehra007 2 роки тому +1

    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

  • @sounaksaha1455
    @sounaksaha1455 2 роки тому

    Beautiful video again bhaiya... Day 8 complete.... Upload consistently... we'll also stay consistent.

  • @productivewind
    @productivewind 2 роки тому

    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.

  • @DPCODE72
    @DPCODE72 2 роки тому

    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.

  • @piyushsrivastava5581
    @piyushsrivastava5581 2 роки тому

    Fav poet- Ahmed Fraz
    Fav Teacher- Mohd Fraz !!

  • @shagunchoudhary3029
    @shagunchoudhary3029 2 роки тому +1

    Your efforts are worth it...💯🙋‍♀️Thankyou bhaiya! For making me understand these questions. WAITING FOR NEXT VIDEO

  • @Raj-pi1pl
    @Raj-pi1pl 2 роки тому

    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

  • @ratnasanjay
    @ratnasanjay 2 роки тому

    Thankyou bhaiya for sharing your knowledge for free it was great learning from you

  • @lalitkashyap1203
    @lalitkashyap1203 2 роки тому +1

    I wait for your lecture video daily

  • @nithins3895
    @nithins3895 2 роки тому

    Day 8✌✌ Got stuck in other works, still managed to complete this✌✌ thanks for the video

  • @isikamaiti9116
    @isikamaiti9116 2 роки тому

    Ep 8 successfully ✅,space complexity is O(n!).your videos are always very good.

  • @shrayanbhattacharya
    @shrayanbhattacharya 2 роки тому

    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

  • @ayan84240
    @ayan84240 2 роки тому +1

    JazakAllah Bhaiya
    Love your videos

  • @mirzaadnanbeg5987
    @mirzaadnanbeg5987 2 роки тому

    Best lecture on this problem

  • @ritiksoni9231
    @ritiksoni9231 2 роки тому +1

    Keeping posting such quality videos ❤️👏

  • @de_ansh
    @de_ansh 2 роки тому

    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...

    • @LearnYardYT
      @LearnYardYT  2 роки тому +1

      That's so good bro
      Thanks for writing ❤️

  • @pallavigaikwad4611
    @pallavigaikwad4611 2 роки тому

    Very clear explanation...Thanks for providing such a nice course🥰💯

  • @maticsdsa21
    @maticsdsa21 2 роки тому

    i am following all yrr lecture ... u r awsm sir jiiiiii

  • @chiragkarnwal6740
    @chiragkarnwal6740 2 роки тому +1

    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 ❤️❤️❤️

  • @priyanshusingh8971
    @priyanshusingh8971 2 роки тому

    completed video and it was full of learning, TQ..

  • @sayanchakraborty165
    @sayanchakraborty165 2 роки тому +1

    Thanks bhaiya for your valuable lectures

  • @mdsufyankhan1029
    @mdsufyankhan1029 2 роки тому +2

    This one is awesome🔥🔥

  • @rishav144
    @rishav144 2 роки тому

    thanks for ur consistency in videos

  • @dipeshjoshi9126
    @dipeshjoshi9126 2 роки тому

    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

  • @abhishekporwal7969
    @abhishekporwal7969 2 роки тому

    Thankyou fraz for making this nice content. It will help a lot of students

  • @bhuneshmeravi8411
    @bhuneshmeravi8411 2 роки тому +1

    sir please annotate the concept while coding this will more helpful sometime we stuck in imagination that how things are works

  • @Anurag_Badwahe
    @Anurag_Badwahe 2 роки тому +1

    Thanks bhaiya for providing us this great content

  • @Abhishek-fo3fc
    @Abhishek-fo3fc 2 роки тому +1

    Done Understood ❤️✅
    Nicely explained #Fraz

  • @abhishekc3556
    @abhishekc3556 2 роки тому

    Bohot badiaa 🔥🔥

  • @programming3043
    @programming3043 2 роки тому

    Can you please talk more about the backtracking step while explaining the recursion tree.
    Space complexity - O(N)
    Time complexity - N log N

  • @yashbahuguna8135
    @yashbahuguna8135 2 роки тому

    i found it difficult but ur explaination is superb

  • @astronautatul
    @astronautatul 2 роки тому

    Nice explanation sir .... thank you so much

  • @itzheavem4451
    @itzheavem4451 2 роки тому

    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

  • @ratnasanjay
    @ratnasanjay 2 роки тому +1

    Thankyou bhaiya for this session

  • @teitb268adityay8
    @teitb268adityay8 2 роки тому

    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

  • @anirudrabrahma_0971
    @anirudrabrahma_0971 2 роки тому +14

    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 ❤️❤️❤️

  • @therock8815
    @therock8815 2 роки тому

    bhaiya ye summer vacation aapke dsa couse ke nam,i hope that after 2 month we are master of dsa🥰🥰

  • @aveermukherjee6419
    @aveermukherjee6419 2 роки тому

    nice explanation keep up the good work.

  • @iamdhirajshastri
    @iamdhirajshastri 2 роки тому

    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❤

  • @arpankoley4256
    @arpankoley4256 2 роки тому

    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)

  • @vinaykamble162
    @vinaykamble162 2 роки тому

    Complete Day 8❤️
    Consistency regular with motivation 🥰
    I think I ignore simple logic instead of your greate recursion logic of every problem.

  • @saisravani2625
    @saisravani2625 2 роки тому

    watched till end 👍

  • @simon8284
    @simon8284 2 роки тому

    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...

  • @shrutiyadav3740
    @shrutiyadav3740 2 роки тому

    sir sorting, stack,queue etc. ye sb topics bhi cover krenge na aap??

  • @Raj-pi1pl
    @Raj-pi1pl 2 роки тому

    8th lecture done ,just cant wait for next video to do more questions.

  • @mohammedmobashir7720
    @mohammedmobashir7720 2 роки тому +1

    Great video bro

  • @yashrajput6798
    @yashrajput6798 2 роки тому

    ep.8 completed ...thanks a lot sir !!

  • @babushaikh6582
    @babushaikh6582 2 роки тому

    Thanks Bhai for helping us 🙏

  • @ramlakhansingh2407
    @ramlakhansingh2407 2 роки тому +2

    Thanks sir

  • @kalimurigangadhar999
    @kalimurigangadhar999 2 роки тому

    Awesome fraz and its clear but can you please dry run through code once at last for better undestnding ❤️

  • @aveermukherjee6419
    @aveermukherjee6419 2 роки тому

    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

  • @recreators7624
    @recreators7624 2 роки тому +1

    EP-8 Completed 🤘

  • @amitranjeetjha1240
    @amitranjeetjha1240 2 роки тому

    Amazing 👏 bhai hasmap aur heaps bhi padha dena thoda beginner level bhi dekh lo

  • @bhuneshmeravi8411
    @bhuneshmeravi8411 2 роки тому +1

    thanks a lot sir🤞🤞

  • @BAnasMustaqueem
    @BAnasMustaqueem 2 роки тому

    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?

  • @ankittjindal
    @ankittjindal 2 роки тому

    Bawall🔥🔥🔥❤️❤️❤️

  • @curiouspatel
    @curiouspatel 2 роки тому

    Ep8 also done successfully ✅

  • @RajputAnkit11
    @RajputAnkit11 2 роки тому

    12:00 thank u for this its really helpful for me

  • @bhavyasharma.111
    @bhavyasharma.111 2 роки тому

    super bhaia ,,,nice

  • @devendrakumargupta9021
    @devendrakumargupta9021 2 роки тому

    Just keep going. Really amazing series 😉

  • @RajputAnkit11
    @RajputAnkit11 2 роки тому

    umm this is what i wanted to learn ❤️
    day 8 done

  • @bharathkumargadi352
    @bharathkumargadi352 2 роки тому

    You are just amazing

  • @LogicArena01
    @LogicArena01 2 роки тому

    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.

  • @apptrendz
    @apptrendz 2 роки тому +1

    Can you traverse thorugh code so that we can understand what is going on inside loop and backtracking step.

    • @udaysree7975
      @udaysree7975 2 роки тому

      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 😊

  • @introvert3487
    @introvert3487 2 роки тому

    Love you sir 💓

  • @aadarshpandey2793
    @aadarshpandey2793 2 роки тому

    Very nice lecture
    👍👍🔥🔥

  • @ABHISHEKKUMAR-ns6om
    @ABHISHEKKUMAR-ns6om 2 роки тому

    Nice Video Sir

  • @dashundev1586
    @dashundev1586 2 роки тому +1

    Difficulty level is increasing slowly

  • @vikaskotwani9573
    @vikaskotwani9573 2 роки тому

    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"

  • @kushalgupta1570
    @kushalgupta1570 2 роки тому

    Thanks bhaiya 😄😄

  • @devanshgupta9283
    @devanshgupta9283 2 роки тому

    ❤️❤️ thankyou sir.

  • @gauravkumar3036
    @gauravkumar3036 2 роки тому +1

    Bahiya when will you organise coding contest?

  • @surabhichoubey2987
    @surabhichoubey2987 2 роки тому

    Thanku Soo much bhiya 💫

  • @psquickfact3490
    @psquickfact3490 2 роки тому

    good job bhaiaya i like third year student cse