157: Remove duplicates from a sorted linked list 2
Given a sorted linked list, remove all duplicates
Note: Leave only
distinct numbersfrom the givenlinked list
Example 1
Input: 1 -> 1 -> 2 -> 3 -> 3 -> 3 -> 4
Output: 2 -> 4
Example 2
Input: 1 -> 2 -> 3
Output: 1 -> 2 -> 3