Friends Pairing using Backtracking | Backtracking Problems in JAVA

Sdílet
Vložit
  • čas přidán 21. 08. 2020
  • Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
    NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. This video discusses the alternate approach for the Friends Pairing problem using Recursion and Backtracking. In this problem,
    1. You are given an integer n, which represents n friends numbered from 1 to n.
    2. Each one can remain single or can pair up with some other friend.
    3. You have to print all the configurations in which friends can remain single or can be paired up.
    The approach for solving using dynamic programming can be seen here: • Friends Pairing Proble... .
    .....................................................................................................................................................................
    Pepcoding has taken the initiative to provide counselling and learning resources to all curious, skilful and dedicated Indian coders. This video is part of the series to impart industry-level web development and programming skills in the community.
    For better experience and well organised free resources visit - nados.pepcoding.com/feed
    We also provide professional courses with live classes and placement opportunities.
    DSA Level 1 and Level 2
    czcams.com/users/Pepcodingp...
    Webinar on GATE Preparation
    • Video
    Here is a roadmap to our Free study content and know more about our resources here - www.pepcoding.com/resources/
    We are also available on the following social media platforms: -
    Facebook(Meta) - / pepcoding
    Instagram - / pepcoding
    LinkedIn - / pepc. .
    Pinterest - / _c. .
    Twitter - / pepcoding
    CZcams (English Channel)- / @pepcodingprogrammingi...
    Also take a look at our placement assistance - www.pepcoding.com/placements
    HAPPY PROGRAMMING!
    Pep it up.....
    #recursion #friends pairing #backtracking

Komentáře • 66

  • @CobraAnkit
    @CobraAnkit Před 7 měsíci +1

    This question is actually full of small concepts. It took me a few hours to get the small code.

  • @manpreetsinghrana7751
    @manpreetsinghrana7751 Před rokem +1

    this is BEYOND SUPER stuff!!!

  • @adarshkumar-di2dh
    @adarshkumar-di2dh Před 3 lety

    sir, aapke dedication ko saalam

  • @vaibhav.polska
    @vaibhav.polska Před 2 lety

    Love the explaination!!

  • @CodeCraftWithVinayak
    @CodeCraftWithVinayak Před 3 lety +3

    thank you. as usually quality content.

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      Glad you enjoy it!! share it as much as you can

  • @thegoffietechie7041
    @thegoffietechie7041 Před 3 lety +2

    Sir aapki backtracking ki videos bahut acchi hai bahut kuch seekhne ko milra hai thanku

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      Seekhte reh mere bhai. Mai bnata rahunga

  • @sandeepjha6794
    @sandeepjha6794 Před 2 lety +1

    Thanks!

  • @W0807THORE
    @W0807THORE Před 3 lety +7

    You have really amazing teaching skills! am pleased to see your efforts and work on each questions. You always explain in very much detailed on each questions. Just a request to add time and space complexity in the coming each new videos then your videos will be complete package. Thank you so much!

    • @Pepcoding
      @Pepcoding  Před 3 lety +2

      hanji, bhool ja rhe hain. aage se dhyaan rakhenge.

    • @W0807THORE
      @W0807THORE Před 3 lety

      @@Pepcoding keep last 1 to 2 min for time and space complexity then your videos will be really a complete package of everything. Thanks once again for your all the hard work and efforts. You will see a very good success on your channel in coming months. All the videos are that Good and fantastic!

  • @loserfruit9663
    @loserfruit9663 Před 3 lety +1

    Crystal clear

  • @ankitmalhotra4209
    @ankitmalhotra4209 Před 2 lety

    nice explanation!!

  • @kumaradityaraj4531
    @kumaradityaraj4531 Před 3 lety +2

    You are one of the best teacher thanku for uploading such contents

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      Thanks and welcome
      If you like my efforts, I request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      czcams.com/users/Pepcodingabout?view_as=subscriber
      For clearing your doubts, you can join our community on telegram
      t.me/pepcoding

  • @_hulk748
    @_hulk748 Před rokem

    thank you sir❤❤🙏🙏

  • @ShivamGupta-fo2ow
    @ShivamGupta-fo2ow Před 3 lety

    sir , you technique of teaching is really nice

    • @Pepcoding
      @Pepcoding  Před 3 lety

      Keep Watching and Glad you liked it !! share among your friends

  • @monikabhasin7245
    @monikabhasin7245 Před 3 lety

    hey Sir.
    Can we do thisproblem like K partition problem???
    matlab isme kya hoga ki hum max to max 'n' partition kar sakte hain.
    and each partition mein 2 se jyaada person nahi aa sakte.
    aur base case mein hum check karenge ki if(index==n) {count++;}

  • @original_gangsta_
    @original_gangsta_ Před 2 lety +1

    Excellent explanation sir🔥🔥🔥💯💯💯

    • @Pepcoding
      @Pepcoding  Před 2 lety

      Glad you like the video.
      For better experience and well organised content sign up on nados.io
      Don't forget to follow us on Instagram instagram.com/pepcoding/

  • @LegitGamer2345
    @LegitGamer2345 Před 3 lety +2

    time complexity - O(o^l)
    space complexity - O(l)
    where o and l are options and levels respectively
    is this correct ?

  • @karanveersingh5535
    @karanveersingh5535 Před 2 lety

    Excellent sir 👍🔥

    • @Pepcoding
      @Pepcoding  Před 2 lety

      Glad you liked it!
      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @abhi-shake9309
    @abhi-shake9309 Před 3 lety +5

    Sir LevelUP and IP combined kab tak complete ho jayga?
    Sir if possible post ques. Of Trees and DP side by side.
    Loving your content very much.🔥🔥❤️

  • @ayushgoel9584
    @ayushgoel9584 Před 3 lety +3

    Sir, at 44:40 aapne kaha hai ki isme humse permutation banne se roka hai kyunki humne loop (i+1) se chalaya hai, 1 se nhi , Sir agar hum loop 1 se bhi chalaaye tab bhi koi dikkat nhi hai kyunki 'i' se piche wale bande already used mein true honge toh unpe call jaayegi hi nhi, toh permutation generate nhi hongi. iss code mein (j=1;j

    • @raja17
      @raja17 Před 2 lety

      Haan. True

    • @ayushgoel9584
      @ayushgoel9584 Před 2 lety

      @@raja17 bro, MAIT CSE 2020 batch(C - 456) , if I identify you correctly?

    • @raja17
      @raja17 Před 2 lety

      @@ayushgoel9584 yes bhai xD

    • @dipeshsaili4468
      @dipeshsaili4468 Před 2 lety

      Koi whatsapp group h ? coding doubts ke liye?

    • @dipeshsaili4468
      @dipeshsaili4468 Před 2 lety

      @Ayush Goel
      @Raja Bhardwaj

  • @XploreWithAbhishek
    @XploreWithAbhishek Před 3 lety

    Sir will you cover the list of imp. questions that you've provided in this course?
    Are there any chances for getting into product based compnies after completing all the three courses.

    • @Pepcoding
      @Pepcoding  Před 3 lety +3

      Yes! that list will also be covered. All these questions + OS + DBMS + projects will be required for getting a decent job.

  • @suryapratapsingh5043
    @suryapratapsingh5043 Před 3 lety

    Hi Brother, I found that in this question (online-java-foundation -> recursion-on-the-way-up -> print-kpc-official) on website, you have given link of solution video in place of question video. I am commenting here because this is the new view and I hope you will read this comment.

  • @ankitamehra5045
    @ankitamehra5045 Před 3 lety

    sir isme agar sirf number of ways nikalne ho that will be done using dp right?

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      Absolutely!

    • @ankitamehra5045
      @ankitamehra5045 Před 3 lety

      @@Pepcoding sir list karke bhi google Online assessment ki insight nahi ban rahi thi, :( sir is cp important for online tests

  • @ayushjain5360
    @ayushjain5360 Před 3 lety +1

    Hi sir, I'm currently working in service based company. I have completed the foundation course, Should I wait for interview Prep course or level up is also required to crack product based company.

    • @Pepcoding
      @Pepcoding  Před 3 lety

      No need for level up aap beta interview prep join kijiee.

    • @bikideka7880
      @bikideka7880 Před 3 lety +1

      hey bro how much time you get for preparation as you are also working?

  • @bibhusingh2
    @bibhusingh2 Před 3 lety +3

    I'm the only person who Subscribed this channel from my all three accounts 😅.
    Kuki Sumeet Bhaiya ko famous karna h!

    • @Pepcoding
      @Pepcoding  Před 3 lety +4

      Hahaa !! beta ghrr ke srre members ke account se krdoo 😅 !! Thank You very much

    • @bibhusingh2
      @bibhusingh2 Před 3 lety +1

      @@Pepcoding Bilkul sir❤️

  • @kiyotaka721
    @kiyotaka721 Před 3 lety

    Great video sir ,sir iski time complexity kya hogi?

    • @Pepcoding
      @Pepcoding  Před 3 lety

      Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.

    • @kiyotaka721
      @kiyotaka721 Před 3 lety

      @@Pepcoding ok sir no problem

  • @varunsharma2043
    @varunsharma2043 Před 3 lety

    sir please post video on magnets official.

    • @Pepcoding
      @Pepcoding  Před 3 lety

      Hanji beta, ek bari jo agenda main questions h vo complete kr le, then ye sb cheeze bhi cover kr lenge.

  • @ravidagar6623
    @ravidagar6623 Před 3 lety

    Sir strings ke lectures kab aayenge?

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      Beta backtracking or bit manipulation k baad!

    • @anjneykumarsingh4461
      @anjneykumarsingh4461 Před 3 lety +1

      Bhai old videos dekhle vo toh bhut chota sa h real mja toh recursion degi kya pdhaya h bhaiya ne

  • @lavishgarg4274
    @lavishgarg4274 Před 3 lety

    Sir Video Quality pls thodi improve kijiye,rest all is good .

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      beta youtube thodi derr baad HD process kar dega.

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      support.google.com/youtube/thread/15412965?hl=en
      abhi premiere ke baad quality khud improve ho jaegi

  • @indranilchakraborty5949

    There is a problem named magnet in list but no solution here...🙂.

    • @Pepcoding
      @Pepcoding  Před 3 lety

      Hanji beta, rehti h abhi uski video, jaldi daalege

  • @sharathkumar8338
    @sharathkumar8338 Před 3 lety +1

    Kindly please try to upload all DSA vidoes. Bahar bade bade institutions hazaro rupai charge kar rahe hai vo bhi bahut low level content ke liye and logon ko bewakoof bana rahe hai vo bhi bade institution. loot rahe hai jhoot bolkar . Kindly you can stop this because I'm saying this I'm a victim of that.

    • @Pepcoding
      @Pepcoding  Před 3 lety +1

      Haha keep learning and keep loving Pepcoding😊

  • @RiteshKumar-nt5sj
    @RiteshKumar-nt5sj Před 2 lety

    humko level up rula raha hai.

  • @aashishjha3223
    @aashishjha3223 Před 3 lety +2

    itni mehnat mt karo sir ek dry run code se phle ek code k baad bhot h. Jisko smjh nhi aayega vo repeat kr lega.
    Edit: Aur sir ho sake to hr code k end m complexity bs bta diya kro, hm khud analyze kr lenge