Skip to content

This is an algorithm that does NOT sort anything. It's worst than Bubble Sort and takes longer to finish.

License

Notifications You must be signed in to change notification settings

marcosrocha85/nothing-sort-js

Repository files navigation

nothing-sort-js

This is an algorithm that does NOT sorting anything. It's worst than Bubble Sort and takes longer to finish.

Install

Clone the repo and use the javascript file in the dist folder.

You have to include

<script src="path/to/nothing-sort.min.js"></script>

in your page and you are done.

Usage

Create an instance of NothingSort:

let nothingSort = new NothingSort(options)

For instance, the only option outputs a message when NothingSort finished it's job.

let nothingSort = new NothingSort({
    logWhenFinish: false // true if you want to see the message at console
})

And then, call the sort method to sort an array:

let myDataToNotSort = [5, 3, 2, 0, 1, 4]

let unsortedData = nothingSort.notSort(myDataToNotSort)

console.log(unsortedData)
// Outputs
// [5, 3, 2, 0, 1, 4]

Example

Clone the repo and look in the example folder.

Thanks

Harrison Graham to develop a worst Bubble Sort function in C++ which inspired me to put here in Nothing Sort.

Develop

Clone the repo then use npm install for download all the dependencies then launch npm run build for build the project.

Pull Requests?

I'd love them!

Comments?

Let's hear them! (The nice ones please!)

About

This is an algorithm that does NOT sort anything. It's worst than Bubble Sort and takes longer to finish.

Resources

License

Stars

Watchers

Forks