2 unstable releases
0.2.0 | Dec 30, 2021 |
---|---|
0.1.0 | Dec 29, 2021 |
#2593 in Algorithms
4KB
65 lines
What it does
Finds the longest increasing subsequence (lis).
Features
- Time complexity
O(nlogn)
- Space complexity
O(n)
- Supports multiple types
Version Note : Update Readme and description
Example
use lisa::interface::find_lis;
fn main() {
let slice = [3, 10, 2, 1, 20];
let lis = find_lis(&slice);
println!("{:?}", lis); // [3, 10, 20]
}