资源 · 指南或文章
Longest Increasing Subsequence
定义最长递增子序列问题,并对比两种时间上界,适合在研究动态规划解法和耐心排序式解法之前阅读。
审核日期
打开原站: Longest Increasing Subsequence (在新标签页中打开原网站)添加到路线图
把这个资源放进你正在跟进的路线图。它会作为你自己的补充资源显示;路线图的步骤不会改变,也不计入你已记录的步骤。
来源内容语言:英语
The longest increasing subsequence problem is to find a subsequence of a given sequence in which the subsequence's elements are in sorted order, lowest to highest, and in which the subsequence is as long as possible. This subsequence is not necessarily contiguous, or unique. The longest increasing subsequence problem is solvable in time O(n log n), where n denotes the length of the input sequence. Dynamic programming approach has complexity O(n * n).
PrepKit 概览
本概览由 PrepKit 编辑根据源代码仓库撰写并审核,并非资源本身的文字。
- 适合人群
- 来源未说明适用级别
- 形式
- 参考资料
涵盖内容
- 复杂度说明:可以做到 O(n log n),而动态规划方法为 O(n * n)。
- 以二进制 Van der Corput 序列的前 16 项为例,给出若干个长度为六的答案。
使用建议
这是 PrepKit 的学习建议,并非来源的说法。
编写 O(n * n) 的动态规划,在示例序列上检验,并解释为什么不止一个答案是正确的。
范围与局限
README 给出了 O(n log n) 上界,但没有解释具体方法。更多细节留给维基百科和一个 YouTube 视频。
获取方式与形式
GitHub 上采用 MIT 许可的 trekhleb/javascript-algorithms 仓库中的免费英文 README。
PrepKit 于 2026年10月2日 审核。 资源来源提交: 85293e3e2b88
本概览的依据
- src/algorithms/sets/longest-increasing-subsequence/README.md
收录此条目的页面
订阅 PrepKit 通讯
可选。使用 PrepKit 并不需要订阅。