Insertion Sort a Linked List

sorting-algorithms
insertion-sort
data-structure
linked-list

(Team) #1

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 http://iq.opengenus.org/insertion-sort-linked-list/