Easy

Insertion Sort

Insertion sort slides each new item leftward into a sorted prefix. Nearly sorted input does little sliding.

Costs

CategoryAlgorithm
DifficultyEasy
Worst and averageO(n²)
Already nearly sortedO(n)
Extra memoryO(1)

Questions

What is Insertion Sort?

Insertion sort slides each new item leftward into a sorted prefix. Nearly sorted input does little sliding.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.