Quora關於如何學習動態規劃的一些建議

EddieJ發表於2019-03-25

I will tell you some points.

  1. First increase you thinking abilities. (Don't take this, in wrong way, my mean to say is , solve problem related to Recursion and after solving problem through recursion , try to solve it iterative way (If it is possible, but try) , How it will help? you will understand. ) and if you have practiced already, jump to second step.

  2. Then start solving Classical Dynamic Programming Question.

    1. Knapsack.
    2. LCS.
    3. Matrix Chain Multipication .
    4. Coin Change.
    5. LIS.
    6. Edit Distance.
    7. Balanced Partition.
    8. Optimal Strategy for a Game.
  3. Now start solving DP problem on various Online Judges.(Spoj, Codeforces, hackerrank, codechef etc.)

  4. If you get stuck somewhere and you don't find any solution than read other users’ solution and try to understand them. It will also increase your thinking abilities, you will get to know that (ohh yeah it can also be solved this way.)

  5. Last but not least, DP is perfect example of "Practice makes a man Perfect." The more you practice , the more you learn.

Now, you are still thinking that why I focus more on recursion, some times thinking a recursive solution is more easy than iterative.(That's my point of view , may be for you its easy to solve through iterative.)

Some reference for practice:-

Dynamic Programming - From Novice to Advanced

Algorithms - GeeksforGeeks

Problem classifier for SPOJ.pl

Programming problems for dp

700 problems to understand you complete algorithmic programming.

Tutorial for Dynamic Programming

Dynamic Programming - I - Arjit Srivastava

nanocad.ee.ucla.edu/pub/M...

Hope this will help you. :) Have fun. :)

相關文章