LeetCode 82 | Remove Duplicates from Sorted Linked List II | Solution Explained (Java)

Опубликовано: 01 Март 2026
на канале: Xavier Elon
2,311
51

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.

Return the linked list sorted as well.

Running Time: O(n)
Space Complexity: O(1)


Github: https://github.com/xavierelon1
Github HackerRank Solutions: https://github.com/XavierElon1/Hacker...
Github Leetcode Solutions: https://github.com/XavierElon1/LeetCo...
Facebook:   / xavier.hollingsworth.3  
Instagram:   / xavierelon  
LinkedIn:   / xavier-hollingsworth-524144127  
Twitter:   / elon_xavier