Collection of basic algorithms for everyday development
LIst of algorithms:
- Binary search algorithm.
- Knuth–Morris–Pratt string-searching algorithm (or KMP algorithm)
Example
extern crate librualg;
use *;
extern crate librualg;
use librualg::*;
fn main(){
let seq = [1, 2, 3, 3, 4, 5];
assert_eq!(binary_search::upper_bound(&seq, &3), Some(3));
}