randsort

Crates.iorandsort
lib.rsrandsort
version0.1.0
sourcesrc
created_at2023-08-26 01:04:29.083628
updated_at2023-08-26 01:04:29.083628
description A sorting library with an optimal complexity of O(n) (!!) by randomly sorting Vectors until they are sorted
homepage
repositoryhttps://github.com/Okirshen/randsort
max_upload_size
id955214
size4,612
(Okirshen)

documentation

https://docs.rs/randsort

README

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).

Commit count: 6

cargo fmt