bubblesort-algorithm
v1.0.1
Published
bubble sort
Downloads
3
Readme
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);