Absolute List Sorting
Given a linked list L of N nodes, sorted in ascending order based on the absolute values of its data.Sort the linked list according to the actual values.
Example:
Input : 1 -> -2 -> -3 -> 4 -> -5
Output: -5 -> -3 -> -2 -> 1 -> 4
Latest Source Code:
Github: AbsoluteListSorting.java
Output:
1 -2 -3 4 -5 -5 -3 -2 1 4