sort-steps

Crates.iosort-steps
lib.rssort-steps
version0.2.4
sourcesrc
created_at2022-04-20 03:32:07.42712
updated_at2023-03-27 07:36:50.449176
descriptionSort terms step by step.
homepage
repositoryhttps://github.com/oovm/sort-steps
max_upload_size
id570733
size31,323
SasakiSaki (oovm)

documentation

https://docs.rs/sort-steps

README

#[test]
fn sort_step_by_step() {
    let numbers = [5, 9, 3, 6, 8, 2, 1, 7, 4];
    println!("Bubble Sort Steps:");
    for (i, v) in bubble_sort(&numbers).enumerate() {
        println!("#{}: {:?}", i, v);
    }
    println!("Insertion Sort Steps:");
    for (i, v) in insertion_sort(&numbers).enumerate() {
        println!("#{}: {:?}", i, v);
    }
    println!("Pancake Sort Steps:");
    for (i, v) in pancake_sort(&numbers).enumerate() {
        println!("#{}: {:?}", i, v);
    }
}

#[test]
fn bogo_step_by_step() {
    let numbers = [3, 4, 1, 2, 5];
    println!("Bogo Sort Steps:");
    for (i, v) in bogo_sort(&numbers).enumerate() {
        println!("#{}: {:?}", i, v);
    }
}
Commit count: 0

cargo fmt