paint-brush
Essential Algorithms: The Quick Sortby@joshuaecampbell
2,120 reads
2,120 reads

Essential Algorithms: The Quick Sort

by Joshua Campbell21mMarch 25th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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
Joshua Campbell

Joshua Campbell

@joshuaecampbell

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

About Author

Joshua Campbell HackerNoon profile picture
Joshua Campbell@joshuaecampbell

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite