摘要:
前几天做题遇到求LIS的题,照常用dp去做结果超时了。之后就去网上找了O(nlogn)的方法。因为看了好几个博客我才看懂,所以这里我进行下总结。首先第一种写法:假设存在一个序列d[1..9] = 2 1 5 3 6 4 8 9 7,可以看出来它的LIS长度为5。下面一... 阅读全文
posted @ 2018-05-07 20:26
Assassin_poi君
阅读(239)
评论(0)
推荐(0)
摘要:
There is a sequence X (i.e. x[1], x[2], ..., x[n]). We define increasing subsequence of X as x[i1], x[i2],...,x[ik], which satisfies f... 阅读全文
posted @ 2018-05-07 20:04
Assassin_poi君
阅读(140)
评论(0)
推荐(0)