23. Remove Duplicates From a Sorted List
EasyLinked lists
A linked list is sorted in non-decreasing order. Remove duplicate nodes so that each value appears once, and return the head.
A linked list is passed as ListNode objects with val and next. The tests write lists as arrays.
Example 1
Input: head = [1, 1, 2, 3, 3] Output: [1, 2, 3]
Constraints
0 ≤ nodes ≤ 300