DZone

Hey to everyone! I guess you all did sorting at least once. I also guess that everyone knows a sorting called “Bubble,” cause it is the easiest and most popular. But when it comes to time and your memory, what will you do?

Imagine a situation. You have a mass that contains about 10^100 elements. Is it still good to use bubble sorting? Just imagine checking every element… and not once. It is not so difficult to count how many operations it is and how much time it takes.

Source: DZone