Essential Algorithms: The Quick Sortby@joshuaecampbell
2,106 reads

Essential Algorithms: The Quick Sort

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

The Quick Sort is an interesting algorithm and a favorite among software engineers. Quick Sort can be highly efficient, often outperforming Merge Sort. The algorithm works by selecting an item from somewhere inside of an unsorted array, and comparing all of the items to that one. When an array is sorted, everything to the left of our pivot will be smaller than the pivot. When it finds an item on the left that should be on the right, it swaps these two items. This recursive division and comparison scheme is the same divide-and-conquer approach that Merge Sort takes. This allows an array to be sorted by performing operations directly on the actual array.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Essential Algorithms: The Quick Sort
Joshua Campbell HackerNoon profile picture

@joshuaecampbell

Joshua Campbell

Receive Stories from @joshuaecampbell

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!