randsort 0.1.0

A sorting library with an optimal complexity of O(n) (!!) by randomly sorting Vectors until they are sorted
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented1 out of 3 items with examples
  • Size
  • Source code size: 4.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 298.25 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Okirshen/randsort
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Okirshen

Randsort

docs.rs Crates.io

A sorting library with an optimal complexity of O(n) (!!) by randomly sorting Vectors until they are sorted.

Sorting Made Easy

Over the years I have discovered many sorting algorithms. Some are bad, some are worse. After searching for years for the perfect algorithms I have decided to create it myself. No more learning complex algorithms. No more benchmarking millisecond differences.

With Randsort the rand create handles everything for you by scrambling your Vec until it sorts itself out.

Usage

In order to use the randsort algorithm simply run the .randsort function on your Vec where T implements PartialOrd. Like so:

let mut vec = vec![5, 4, 8, 9, 12, 1, 3909, 567, 5, 6];
vec.randsort(); // => [1, 4, 5, 5, 6, 8, 9, 12, 567, 3909]

License

This crate is licensed under the MIT license (GPL isn't really libre).