Quicksort vs Bubblesort

preview_player
Показать описание
Quicksort beats bubble sort in a race to sort lines by length #shorts

Quicksort is an N log n algorithm, bubble sort is an N^2 algorithm. I had to use only 60 lines in the sorting rather than 200 I've used in other videos, or else the difference in time just got ridiculous

Images in the thumbnail
robot 1
robot 2
explosion
Рекомендации по теме
Комментарии
Автор

Quicksort is fast, but has a lot of flaws in this form, normally you'd at least add an insertionsort to sort the smaller chunks. Just like pdq, which is a quicksort based high speed algorithm. There is also Grailsort, which is an algorithm that outperforms most other sorts.

jeremy.N
Автор

arent merge, radix and counting faster than quick sort?

elliot