Introduction to Quicksort

This algorithm sorts a list by choosing a pivot and comparing each element to that pivot. (Reading time: )

As quicksort doesn’t use any space, it’s a in-place sorting algorithm. The way quicksort works is by choosing a pivot (an element in the array, often random), and check whether values in the array are higher or lower than that pivot. The values lower than the pivot should be on the left side, and the values higher than the pivot should be on the right side!

Get hands-on with 1200+ tech skills courses.