/bogosort

Don't use it, please.

Primary LanguageTypeScriptThe UnlicenseUnlicense

bogosort

Don't use it, please.

Usage 👍

import bogosort from "@rafif0s/bogosort";

/**
 * @see {@link https://stackoverflow.com/a/34966558}
 */
const unsortedArr = Array.from({ length: 5 }, () => Math.floor(Math.random() * 9));
console.debug(unsortedArr); // [ 1, 7, 2, 1, 8 ]

const sortedArr = bogosort(unsortedArr);
console.debug(sortedArr); // [ 1, 1, 2, 7, 8 ]

Notice

This piece of software is licensed under the Unlicense and is based on the implementation available at Rosetta Code, which is licensed under the GNU Free Documentation License 1.2.