Learn: Bubble Sort in Javascript

Bubble Sort is the simplest sorting algorithm that repeatedly scrolls through the list, compares adjacent elements and swaps them if they are in the wrong order. This sort is not used in real-world project because is very performs poorly.

Fast example

We start with an array, not sorted, composed like this: [8,5,2,6,12] The algorithm consists in cycling the array, checking…

--

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Riccardo Canella

Riccardo Canella

Riccardo Canella @ricanella92 Love #basket, #bike and #HIMYM since my childhood. #Fullstack #Javascript addicted - https://canellariccardo.it

More from Medium