Essential Algorithms: The Quick Sort

Written by joshuaecampbell | Published 2020/03/25
Tech Story Tags: programming | python | algorithms | quick-sort | merge-sort | bubble-sort | hackernoon-top-story | learn-to-code

TLDR 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.via the TL;DR App

no story

Published by HackerNoon on 2020/03/25