Search code examples
algorithmsortingbubble-sort

Why bubble sort is called bubble sort?


I am learning bubble sort. And I tend to forget about the type of sort everytime. So I am trying to find the logical meaning of each sort so that it helps in recalling the logic of sort :

I could not understand exact meaning that why bubble sort is named bubble sort?


Solution

  • Why is it called bubble sort?

    The bubble sort gets its name because elements tend to move up into the correct order like bubbles rising to the surface.