Coding Interview Question | Dynamic Programming | Subset Sum Problem with space optimization
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...
I think we have to travese backwards otherwise we will get wrong answer in following case.
set = {2,2,3}
target = 6
Very clear . Thanks for the video
thank you for the good explanation
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 .
The explanation was really very good.Thanks
Thank you 😊😊
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?.
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.
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
Many videos coming up :)
Great explanation . Can you please cover subset problems that ask for array pairs that are divisible by k
Sure, and thank you! 🙂
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.
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.....
Do more videos on backtracking also ma'am as product based companies are keen on selecting students..
By the way you look so pretty...
Will be doing many videos @hemanth. Thank you :)
Can you provide code for this problem ....
Maam pseudo code rahta toh aur accha hota.
bakki explanation is very good.
It was so nice, but can you please improve the mic quality.
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 🙂