最长递减子序列 【微软面试100题 第四十七题】
摘要:
题目要求: 求一个数组的最长递减子序列; 比如{9,4,3,2,5,4,3,2}的最长递减子序列为{9,5,4,3,2}。代码实现:代码1:动态规划,时间复杂度O(N^2).#include using namespace std;const int N = 8;int Lis(int a[],... 阅读全文
posted @ 2014-11-07 19:05 tractorman 阅读(243) 评论(0) 推荐(0)
浙公网安备 33010602011771号