1.0.1 • Published 4 years ago

bubblesort-algorithm v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Bubble Sort

Bubble Sort is a simple algorithm. It works by checking each item in the list that is going to be ordered with the next one, swapping them if they are in the wrong order.

Install Package:

$ npm install bubblesort-algorithm

How it Works?:

Function receives a disordered Array:
Ej: 1, 9, 5, 2, 10, 6, 3, 7, 8, 4

const bubbleSort = require("bubblesort-algorithm");

let array = [1, 9, 5, 2, 10, 6, 3, 7, 8, 4];

bubbleSort(array);
console.log(array);