Sorting Algorithms Animations | Toptal®
Operates in place, requiring O (1) extra space. Worst-case O (n·lg (n)) key comparisons. Worst-case O (n) swaps. Adaptive: Speeds up to O (n) when data is nearly sorted or when there are few unique keys. There is no algorithm that has all of these properties, and …