Lately, I’ve been working on my understanding of algorithms. This post will try to explain and implementation of sorting with the easiest method — bubble sort.

Although the bubble sort algorithm compared to other sorting algorithms isn’t that efficient, and isn’t used anywhere in the real world, interviewers still commonly check for it during interviews. It is good to at least know how it works under the hood.

How does bubble sort (you can also find it under the alternate name sinking sort) work? The algorithm ‘bubbles’ large values (thus the name) to the top on each iteration of the…

Marcus Siegel

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