:( I feel like this is going to end my onsite. I don’t understand it. I spent the last 3 days staring at partition equal subset sum. I don’t understand the loop... I don’t get the dp[j] part. :/ why does a Production Engineer/SRE at facebook/Google/LinkedIn or whenever need to know DP? How often does one even encounter a DP problem? Sigh. I don’t know. I don’t get it. Feeling so defeated and want to just jump off the building or some shit. God. I can talk about linux kernel all day long but not DP!
Putting true in index 0 of dp? Dp[-1] returns last value of dp? Right?
Zero number always equals to sum 0, hence true.
You might want to tackle ‘memoization’ first, then ‘ground-up DP’. Also another tip would be to practice in a language like Python so you can focus just on the algorithm, less on the syntax (ex in C++). Have fun!
Double penetration does cause death
Great minds think alike in the gutter.
Fist me, bro
It's not easy but it'll click at some point.
I got fked in amazon interview due to DP as well. Good lk man
Yeah :( sorry to hear that.
Have you tried the course from educative.io ?
I read that website and still far from understanding. I will keep trying...
It’s ironic coz Oscar DP’ed me in phone and onsite interviews. I’d say focus on top down approaches and then optimize to bottom up. It’s always easier to understand what’s going on that way, you will see the pattern over time and just be able to jump bottom up right away
This is easy. Anyone with a CS degree should know this.
Get EPI (elements of programming interviews) and try interviewcake.com. Those two helped with DP a ton, personally. I still don’t fully comprehend it, but the problems I’ve done, I fully understand those and can figure out minor adjustments to similar problems.
Either they will ask dp or they wont
This 0/1 shit is so mad to me.
Youtube videos are useful for dp. Also geeksforgeeks. They explain well