paint-brush
Essential Algorithms: The Bubble Sortby@joshuaecampbell
1,752 reads
1,752 reads

Essential Algorithms: The Bubble Sort

by Joshua Campbell11mMarch 6th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Essential Algorithms: The Bubble Sort - a dead-simple, yet terribly inefficient, algorithm. It simply passes over an unsorted array, comparing one number to the one next to it. If the bigger number is on the left, then it swaps their places. It goes through each element individually until it's done with the array, and repeats that as many times as it needs to in order to sort the array. The reason it's called Bubble Sort is because it causes the largest unsorted number to bubble up to the top of the array on the first pass.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Essential Algorithms: The Bubble Sort
Joshua Campbell HackerNoon profile picture
Joshua Campbell

Joshua Campbell

@joshuaecampbell

L O A D I N G
. . . comments & more!

About Author

Joshua Campbell HackerNoon profile picture
Joshua Campbell@joshuaecampbell

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Joyk
Cxyzjd
Cxyzjd
Cxybb
Coffee-web
Prodsens
Learnrepo
Owlver
Owlver
Style-tricks
Freesion
Tefter
Pipfeed
Areyoupop