Solving dynamic programming interview problems
11–20 of 176 posts
Re: Solving dynamic programming interview problems
#12Step 2. ur sub problems better overlap
Step 3. time to table dat dag
Step 4. solve ur problems and build ur table graph the way a dag would : to-po-lo-gi-cal-ly
Re: Solving dynamic programming interview problems
#13I recently had a programming interview where, at the whiteboard question, I said "this may be a dynamic programming question, let me see--" and the interviewer said "STOP! Stop, every time someone says that, they end up flopping and never getting anywhere. Don't go down that path, I'm telling you." I think it had more to do with the interviewer being a poor interviewer, however.
Unfortunately my DP was really bad so I knew right then I'm going to flop. And flop I did.
For me the two weakest points are DP, and coming up with the right O() estimate for an algorithm that I just created on the whiteboard, and am looking at it for the first time in my life. Would love advice on how to get good at both.
Re: Solving dynamic programming interview problems
#14Re: Solving dynamic programming interview problems
#15I recently had a programming interview where, at the whiteboard question, I said "this may be a dynamic programming question, let me see--" and the interviewer said "STOP! Stop, every time someone says that, they end up flopping and never getting anywhere. Don't go down that path, I'm telling you." I think it had more to do with the interviewer being a poor interviewer, however.
For me it was a bit the other way around. I solved the problem in a brute force way and on interviewer's asking, was flopping to come up with a better algorithm. Then he mentioned that I should consider DP. Unfortunately my DP was really bad so I knew right then I'm going to flop. And flop I did. For me the two weakest points are DP, and coming up with the right O() estimate for an algorithm that I just created on th…
For Big O notation? Just think about how many times you're iterating through things (in the worst possible case).
e.g. Got two nested for loops each going to N.. we're going to loop N on the outer loop, so and each iteration of the inner loop we go through N times? that's N x N so O(N^2).. (easy example obviously).
Re: Solving dynamic programming interview problems
#16I really wanted to try out your service couple of weeks ago, but turns out you are only in US. Any plans of opening it for Europe?
Re: Solving dynamic programming interview problems
#17Re: Solving dynamic programming interview problems
#18Is it just me or the Big O algebra at the end doesn't seem right?
Re: Solving dynamic programming interview problems
#191. existing practices 2. each other
Re: Solving dynamic programming interview problems
#20Is it just me or the Big O algebra at the end doesn't seem right?
But essentially you see that the equation is S^2 - S - 2L from that, you can solve that the roots of the function are: (1) 1/2 + sqrt(2L) and (2) 1/2 - sqrt(2L)
That means that (S-1/2-sqrt(2L)) * (S-1/2+sqrt(2L)) The second term is always positive, which means that we need to make the first term negative in order for the inequality to hold.
=> S Does this make sense?