[][src]Crate buldak

It is a library that provides various sorting functions.

install

If cargo-edit is installed, you can install it like this:

cargo add buldak

If not, you have to manually add the dependency to Cargo.toml.

[dependencies]
buldak = "*"

use

If you have performed the installation process well, you can sort by passing the values ​​in an array format as follows.

use buldak::*;

fn main()
{
    let mut nums = [6, 34, 3, 1, 2];
    bubble::sort(&mut nums);
    println!("{:?}", nums);
}

features

  • bubble sort
  • smart bubble sort
  • selection sort
  • double selection sort
  • insertion sort
  • quick sort
  • counting sort
  • ... more later

Modules

bubble

bubble sort algorithm

counting

counting sort algorithm

double_selection

double selection sort algorithm

insertion

insertion sort algorithm

quick

quick sort algorithm

selection

selection sort algorithm

smart_bubble

smart bubble sort algorithm This algorithm eliminates unnecessary repetitions in bubble sort.