I still never learned bubble sort. Somehow, it’s not come up...
Not sure you need to learn it. If you were to think of a sorting algorithm you'd likely come up with it anyway
You're not alone. I'm on the same boat. I don't even know what it is. The only sorts I really do understand are merge sort, quick sort, insertion sort and counting sort
They all sound like sex terms
Hey brah, want to go sort each other out?
It's basically the same as insertion sort - but insertion sort is usually faster in the average case (although by a constant factor) The key difference is that insertion sort iterates over the SORTED section each time to find where to put the next unsorted element, while bubble sort iterates over the UNSORTED elements to find the largest. That insertion sort usually assembles the list small to large and bubble sort usually large to small is irrelevant to the algorithm. If you had to iteratively find the smallest or largest n elements in place and in order on an array, the simplest C style way of writing it is basically bubble sort
Even Obama knows bubble sort!
Learn sleepsort
Smuggle-sort: when you delete every element in the list that isn’t sorted.
Don’t worry it’s going to burst soon