Dynamic-programming solutions 

Dynamic-programming solutions are similar to divide-and-conquer methods in that both solve problems by breaking larger problems into subproblems whose results are later recombined. However, the approaches differ in how subproblems are related. In divide-and-conquer algorithms, each subproblem is independent of the others. Therefore, we solve each subproblem using recursion (see Chapter 3) and combine its result with the results of other subproblems. In dynamic-programming solutions, subproblems are not independent of one another. In other words, subproblems may share subproblems. In problems like this, a dynamic-programming solution is better than a divide-and-conquer approach because the latter approach will do more work than necessary, as shared subproblems are solved more than once. Although it is an important technique used by many algorithms, none of the algorithms in this book use dynamic programming.

注意 空格

在编程中,经常会遇到需要将第三方cmdline,包装成sdk供内部客户使用,这时候就需要注意空格。因为cmd一般性把空格作为分隔符,所以若参数中含有空格,就需要注意。

用””将参数引起传下去,才不会导致失败。