Dynamic Programming

First, think of solution as a linear sequence of decisions.

Second, work backward from the last decision to see: how a decision depends on previous decisions.

Third, introduce some notation to express the recursive relation,

Fourth, generate condition, find out boundary condition, find out how to do iteration

 

Typical problem: knapsack, longest common subsequence...

posted @ 2017-08-09 19:15  Ariel_HKUST  阅读(139)  评论(0编辑  收藏  举报