FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
algorithm-python2/longest_increasing_sequence.md at master · yangjun616/algorithm-python2 · GitHub
yangjun616
algorithm-python2
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
algorithm-python2
/
longest_increasing_sequence.md
Copy path
More file actions
More file actions
Latest commit
History
History
History
10 lines (8 loc) · 372 Bytes
Breadcrumbs
algorithm-python2
/
longest_increasing_sequence.md
Copy path
File metadata and controls
10 lines (8 loc) · 372 Bytes
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions
问题简介
最长公共上升子序列,longest increasing sequence,简称LCIS
思路
这个问题要由动态规划来解决,时间复杂度是O(n2),空间复杂度是O(n),建立dp[n]和track[n]
意义:
dp[i]:以数据a[i]结尾的最长上升序列长度
track[i]:数据a[i]作为最长上升序列末项的前一项索引
Back
|
FazBrowse Home
|
New Git URL