摘要:
最长公共子序列 1 #include 2 #include 3 #include 4 #include 5 6 #define N 5 7 8 int max(int a, int b, int c) { 9 10 int ab = a>b ? a : b;11 return a... 阅读全文
摘要:
最长递增子序列#include#include#include#include#define N 4int solve(int *array, int n) { int *dp = (int *)malloc(n * sizeof(int)); int i; int j; i... 阅读全文
摘要:
非递归实现#include#includeint isOrdered(int *array, int begin, int end) { return *(array+end) > *(array+begin) ? 1 : 0;}int contains(int *array, int beg... 阅读全文