search-sort 0.3.1

Implementation of few searching and sorting algorithms
Documentation
  • Coverage
  • 100%
    15 out of 15 items documented9 out of 13 items with examples
  • Size
  • Source code size: 18.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 374.34 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • piernczk
search-sort-0.3.1 has been yanked.

search-sort

Implementation of few searching and sorting algorithms. This crate is currently WIP, and supports only few of them.

Searching algorithms to be implemented:

  • linear search
  • binary search
  • jump search
  • exponential search

Sorting algorithms to be implemented:

  • bubble sort
  • quick sort
    • parallel quick sort
  • merge sort
  • insertion sort
  • heap sort
  • radix sort

Quick example

Add this to your Cargo.toml file:

[dependencies]
search-sort = "0.3"

This code sorts the slice and searches for elements in it:

use search_sort::{search, sort};

let mut slice = [5, 1, 91, -45, 11, 5];
sort::quick(&mut slice);
assert_eq!(slice, [-45, 1, 5, 5, 11, 91]);

assert_eq!(Some(2), search::binary_first(&slice, &5));
assert_eq!(None, search::binary_first(&slice, &42));

License

This code is released under the MIT license. See the LICENSE.md file.