murderousbread's blog

By murderousbread, history, 5 years ago, In English

I have been trying for almost a month now to try and understand DP. I started of with first ensuring that I understand recursion correctly. For this I practiced Recursive segment tree problems, And a few basic recursion problems. In addition, I even switched to recursive binary search, which I honestly dislike, just to ensure that I am not lacking in my understanding of recursion.

Next, I started reading tutorials that introduced DP. Ones like this one, https://www.topcoder.com/community/competitive-programming/tutorials/dynamic-programming-from-novice-to-advanced/ , https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/tutorial/ , and a few others.

The problem: While I am able to understand the approach taken in the problems that I have seen, I am unable to apply it myself. To put it differently, I understand the solutions, but am unable to come up with such solutions on my own. And, some of the harder DP problems I am unable to understand even when I read the tutorial multiple times. Its only when I read the code, the tutorial, trace a few test cases that I just start to understand how the program works, leaving me very far away from being able to code it on my own, much less think of it.

My request: How do I improve upon this? I do try various problems on CF and CC, and unfortunately still am unable to get DP. Is the solution even more practice? Obviously there is no single problem that will cause the idea of DP to just, click in my brain. I wish to know if anyone else has faced a similar issue, and if yes, how did they get past it? I am not averse to hard work, just would like to know if only practice will not help me get better.

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it