Merge Sort for Linked Lists - GeeksforGeeksMerge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible. Let the head be the first node of the linked list to be sorted and headRef be the pointer to head.https://www.geeksforgeeks.org/merge-sort-for-linked-list/