Tuesday, March 29, 2016

Dynamic Programming

Dynamic programming is a technique for solving problems with the following properties:
  1. An instance is solved using the solutions for smaller instances.
  2. The solution for a smaller instance might be needed multiple times.
  3. The solutions to smaller instances are stored in a table, so that each smaller instance is solved only once.
  4. Additional space is used to save time.
经典题目:
1. 买卖股票I II III IV

No comments:

Post a Comment