Write code to sort a linked list of 0s, 1s and 2s. Given a linked list which only consists of 0s, 1s and 2s. Write a function to sort a linked list.
For example:
Input: 2 -> 0 -> 1 -> 0 -> 2 -> 0 -> 1 -> NULL
Output: 0 -> 0 -> 0 -> 1 -> 1 -> 2 -> 2 -> NULL