procrastination_sort 1.0.0

The laziest in-place sorting algorithm.
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 17.78 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • uptu/procrastination-sort
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • uptudev

procrastination_sort

"I don't want to sort that entry right now."


Many have asked *"what if there was a sorting algorithm which just threw unsorted elements to the end of the queue to be sorted later?"

I bring you procrastination sort. This algorithm iterates over a slice of elements, finds any that are larger than the next element, and tosses it to the end of the queue. This can be run over and over until the entire slice is sorted.

Contents

Installation

cargo add procrastination_sort will add the package to your Rust project.

Usage

The package exposes two different functions, sort() and sort_from(). sort() is an in-place algorithm that takes a &mut [T] as the only function parameter. sort_from() takes an immutable reference instead, clones the data to a Vec<T>, and returns that Vec<T> sorted.

Contributing

Don't. It's not worth it.

License

This package is dual-licensed under both the Apache-2.0 and MIT licenses. Feel free to review both and choose whichever suits your needs most when using this package.