Insertion Sort a Linked List

Reading time: 15 minutes | Coding time: 20 minutes

Insertion sort is a comparison based sorting algorithm which can be utilized in sorting a Linked List as well. Insertion Sort is preferred for sorting when the data set is almost sorted. The slow random-access performance of a linked list makes some other algorithms such as Quick Sort perform poorly, and others such as Heap Sort completely impossible.

This is a companion discussion topic for the original entry at