Sort a linked list of 0s, 1s and 2s[Microsoft,Amazon]

Problem:

Complete the method which takes oneargument: the head ofthe linked list. The programshould not read any input fromstdin/console.
The struct Node has a data part which stores the data and a nextpointer which points to the next element of the linked list.
There are multiple test cases. For each test case, this method will becalled individually.

Output: The functionshould not print any output to stdin/console.

Problem Link

 

Leave a Reply

Your email address will not be published. Required fields are marked *