liveBook · Manning

Sorting algorithm

As explained in Grokking Algorithms, Second Edition

A sorting algorithm is an algorithm that arranges elements according to an ordering criterion.

A sorting algorithm arranges elements according to an ordering criterion. Sorted data matters because binary search depends on it; selection sort is introduced as a first sorting method and a stepping stone to quicksort. section 1.4 section 2.0

How Grokking Algorithms, Second Edition covers it

How deep it goes
Positions selection sort as preparation for quicksort, without detailing its procedure in this coverage.
Examples
Uses an alphabetized phone book to illustrate how sorted data supports binary search.
What it assumes
Assumes familiarity with Big O notation and logarithms for performance analysis.
What you can do after
Understand how sorted data enables binary search and why selection sort prepares readers for quicksort.
How it connects
Connects sorting to binary search, arrays, linked lists, and quicksort.

Also explained in

Compare how 18 books explain sorting algorithm →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Algorithms, Second Edition. The section links point to the parts of the book it draws on.