A reminder of sorting algorithms. Credit for original animated images goes to Wikipedia.
Name | Best | Average | Worst | Memory | Stable | Method |
---|---|---|---|---|---|---|
Quicksort | ![]() | ![]() | ![]() | ![]() | Depends | Partitioning |
Merge sort | ![]() | ![]() | ![]() | Worst: ![]() | Yes | Merging |
Heapsort | ![]() | ![]() | ![]() | ![]() | No | Selection |
Insertion sort | ![]() | ![]() | ![]() | ![]() | Yes | Insertion |
Bubble sort | ![]() | ![]() | ![]() | ![]() | Yes | Exchanging |