A divide and conquer recursive algorithm.

Quicksort is a commonly used sorting algorithm that has a best-case time complexity of O(n log n) and worst-case of O(n²). The worst-case happens when the array to be sorted is already sorted or nearly sorted.

Quicksort works by selecting an element in the array as the ‘pivot’ and then dividing the array into two partitions. One partition for values less than the pivot and one partition for those that a greater.

Today we will be looking at a quicksort implementation that handles the sorting of an array of integers but it can easily…

Collin Newman

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store