- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLIS.py
More file actions
Latest commit
7 lines (7 loc) · 303 Bytes
/
Copy pathLIS.py
File metadata and controls
7 lines (7 loc) · 303 Bytes
1
2
3
4
5
6
7
'''
Longest Increasing Subsequence (LIS)
Find the length of the longest subsequence of a given sequence
such that all elements of the subsequence are sorted in increasing order.
For example, length of LIS for { 10, 22, 9, 33, 21, 50, 41, 60, 80 } is 6
and LIS is {10, 22, 33, 50, 60, 80}.
'''