pofk_algorithm 0.0.3

A collection of efficient algorithms implemented in Rust for real-world projects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use pofk_algorithm::backtracking_algorithms::combinations::combinations;

#[test]
fn test_combinations_large() {
    let nums = vec![1, 2, 3, 4, 5];
    let combs = combinations(&nums, 3);
    assert_eq!(combs.len(), 10);
    let nums = vec![1, 2, 3, 4];
    let combs = combinations(&nums, 2);
    assert_eq!(combs.len(), 6);
}