1. You are give a single sorted linkedlist of numbers. 2. remove all duplicate nodes such that duplicate numbers appear once and Return the remaning linked list.
Input Format
1->1->1->4->5->6->6->7->8->9->9->9->null
Output Format
1->4->5->6->7->8->9->null
Constraints
0 <= N <= 10^6
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
12 1 1 1 4 5 6 6 7 8 9 9 9
Output
1 4 5 6 7 8 9