News for hackers. Stuff that matters.
Re:Solving dynamic programming interview problems by moufestaphio on Friday May 18, 2018 @02:42PM (#17103890)
For DP? Practice a couple on like HackerRank, CodeFights etc. It starts to make sense after you do a few.

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).

There are no comments on this comment yet.