动态规划:最长单调递增子序列

时间:2015-06-18 15:14:18
【文件属性】:

文件名称:动态规划:最长单调递增子序列

文件大小:583B

文件格式:TXT

更新时间:2015-06-18 15:14:18

动态规划 单调递增子序列

动态规划:最长单调递增子序列 A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK), where 1 <= i1 < i2 < ... < iK <= N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, e. g., (1, 7), (3, 4, 8) and many others. All longest ordered subsequences are of length 4, e. g., (1, 3, 5, 8). Your program, when given the numeric sequence, must find the length of its longest ordered subsequence.


网友评论

  • 动态规划的很好实现 有学习意义
  • 挺好的,实现不错。
  • 很棒!但是有的注释好像打得不太好,不太理解。