lunaris_engine 0.1.0

A collection of efficient algorithms implemented in Rust for real-world projects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Quickselect Example
//!
//! Demonstrates usage of the generic, production-grade quickselect algorithm.

use lunaris_engine::list::quickselect::quickselect;

fn main() {
    let mut data = vec![7, 10, 4, 3, 20, 15];
    let kth = quickselect(&mut data, 2);
    println!("2nd smallest: {:?}", kth);
}