#algorithm #increasing #longest #find #subsequence #lis #nlogn

lisa

lisa - longest increasing subsequence algorithm [ O( nlogn ) ]

2 unstable releases

0.2.0 Dec 30, 2021
0.1.0 Dec 29, 2021

#2593 in Algorithms

MIT license

4KB
65 lines

What it does

Finds the longest increasing subsequence (lis).

Features

  1. Time complexity O(nlogn)
  2. Space complexity O(n)
  3. 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]
 }

No runtime deps