Sort a Linked List which is already sorted on absolute values

sorting-algorithms
data-structure
linked-list

(Team) #1

Reading time: 15 minutes | Coding time: 5 minutes

The problem at hand is to sort a singly Linked List which is already sorted on absolute value. Sorting always takes a time complexity of O(N log N) and in this case, we will be utilizing our knowledge of the data within the Linked List to sort it in O(N) time complexity.


This is a companion discussion topic for the original entry at http://iq.opengenus.org/sort-a-linked-list-already-sorted-on-absolute-values/