Crates.io | randsort |
lib.rs | randsort |
version | 0.1.0 |
source | src |
created_at | 2023-08-26 01:04:29.083628 |
updated_at | 2023-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 | |
repository | https://github.com/Okirshen/randsort |
max_upload_size | |
id | 955214 |
size | 4,612 |
A sorting library with an optimal complexity of O(n) (!!) by randomly sorting Vectors until they are sorted.
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.
In order to use the randsort algorithm simply run the .randsort function on your Vec
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]
This crate is licensed under the MIT license (GPL isn't really libre).