LeetCode刷題筆記(Remove Duplicates from Sorted List)

今天刷了一道比較簡單的鏈表題,感覺還是不順手,下面和大家來分享一下經驗吧! 題目如下: 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-
相關文章
相關標籤/搜索