Coding Interview Question | Dynamic Programming | Subset Sum Problem with space optimization

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • The video consists of following parts-
    0:00-1:08 - Question explanation in detail
    1:08-1:50 - Brute force approach and complexity
    1:50-3:00 - Recursive walk through
    3:00-5:00 - Dp visualisation for question
    5:00-7:30 - Initial Conditions
    7:30-10:35 - Algorithm Formation
    10:35-17:40 - Dry run of Algo for rest of the grid
    17:40-18:25 - Backtracing
    18:25-19:20 - Space Optimization
    Please subscribe to my channel - / keertipurswani
    LinkedIn - / keertipurswani
    Instagram - keerti.purs...

Komentáře • 20

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

    I think we have to travese backwards otherwise we will get wrong answer in following case.
    set = {2,2,3}
    target = 6

  • @ravichandranm3731
    @ravichandranm3731 Před 4 lety +1

    Very clear . Thanks for the video

  • @saiadityaede6679
    @saiadityaede6679 Před 4 lety

    thank you for the good explanation

  • @namratapatil8692
    @namratapatil8692 Před 2 lety

    I am so glad that i am landed on this video and your channel . ur way of teaching is Amazing . Looking forward for more such videos .

  • @ayushbhagat9817
    @ayushbhagat9817 Před 4 lety

    The explanation was really very good.Thanks

  • @yelururao1
    @yelururao1 Před 4 lety +1

    superb..please do all videos by explaining different approaches and discuss edge cases as well. Thanks.
    what is the solution if we have negative values in the array?.

    • @KeertiPurswani
      @KeertiPurswani  Před 4 lety +2

      yes i am trying that :) if negative values are there, then it can't be solved using these approaches since there is no base case then.

  • @saiadityaede6679
    @saiadityaede6679 Před 4 lety +2

    hey hi dont mind i am asking like this can you do more videos like this so that i can prepare for coding exams and get an oppurtunity in any good company. I am watching many videos but your way of explaining was very good and easily understanding

  • @sim77778777
    @sim77778777 Před 3 lety

    Great explanation . Can you please cover subset problems that ask for array pairs that are divisible by k

  • @amu281
    @amu281 Před rokem

    Hi Keerti, I have a doubt here. How do we get on the conclusion that we need OR condition here in the case where element is less than weight. I can sense that this is correct but I am not able to visualize it 100%. Could you explain it little more.

  • @amneetsingh3837
    @amneetsingh3837 Před 3 lety

    please teach top down dp way. Bottom up is affcourse easy to understand , but what if you get a problem that u never seen before, then making top down solution of it is very easy as compared to bottom up.....

  • @hemanthn436
    @hemanthn436 Před 4 lety +1

    Do more videos on backtracking also ma'am as product based companies are keen on selecting students..
    By the way you look so pretty...

  • @butterhere
    @butterhere Před 3 lety

    Can you provide code for this problem ....

  • @priyendusingh4312
    @priyendusingh4312 Před 2 lety

    Maam pseudo code rahta toh aur accha hota.
    bakki explanation is very good.

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

    It was so nice, but can you please improve the mic quality.

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

      Hi,
      I tried different mic in this. Quality should be better in the videos after this 🙂
      Also, planning to switch to new mic in next video 🙂