'Create a ranked linked list from existing single linked list

I would like to know is there a simple way where I create a ranked linked list based on sorting each number in ascending order on each node from a singular linked list using C. Most of the ranking method I seen is using array. Is it possible to use this methods on linked list.

The program should behave as following:

input: singular linked list = -11->9->0->1->null

\\ select the smallest number and rank 1, in this case -11
\\ second smallest number is 0, rank 2,
\\ third smallest number is 1, rank 3
\\ forth smallest number is 9, rank 4

output: ranked linked list   = 1->4->2->3->null


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source