Please enable JavaScript.
Coggle requires JavaScript to display documents.
QuickSort - Coggle Diagram
QuickSort
It can be implemented in different ways
Always last element as pivot
Random element as pivot
Always first element as pivot
Median as Pivot
Complexity
Average Case
N (log n)
Worst Case
N²
Best Case
N
Two Options to implement
Recursive
Iterative
Partitions
Rearrange the array in a way that smaller elements are in the left and greater elements are in the right of the pivot
It's based on choosing a pivot
Divide and Conquer Strategy