Interview prep? Study smart by learning to summarize sorting algorithms

Sorts in 60 Seconds: Speedy JavaScript Interview Answers on Sorting

Developer interviews often ask about sorting algorithms — here is how to explain 10 different sorting algorithms in just 60 seconds.

Dr. Derek Austin 🥳
Coding at Dawn
Published in
12 min readNov 27, 2019

--

Photo by Dawid Zawiła on Unsplash

There is no one sort to rule them all

Sorting algorithms can be a confusing topic, but they are a popular interview subject in software engineering jobs at all levels.

That’s because sorts are a great way to demonstrate whether you understand the trade-offs in selecting an algorithm, including computation time (also called complexity) and the space used (often called overhead).

First, some definitions — then we’ll define each sorting algorithm based on these 5 properties:

“The ideal sorting algorithm would have the following properties:

[✅] Stable: Equal keys aren’t reordered.

[✅] Operates in place, requiring O(1) extra space.

[✅] Worst-case O(n·lg(n)) key…

--

--

Dr. Derek Austin 🥳
Coding at Dawn

Career advice, film reviews, writing tips, and coding with JS / TS, React & Git. Bio: Web dev since '05. BS & MS in Bioinformatics. Doctor of Physical Therapy.