Solving Remove Duplicates from Sorted List in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Given a sorted linked list, delete all duplicates such that each element appear only once.

Example 1:

Input: 1->1->2
Output: 1->2

Example 2:

Input: 1->1->2->3->3
Output: 1->2->3

See the full details of the problem Remove Duplicates from Sorted List at LeetCode

Originally posted at: