Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 208 Bytes

File metadata and controls

5 lines (4 loc) · 208 Bytes

brutal force

For each of the group with the same value, we check if the current node has the same value with the next node. If they are the same we can delete the current node.

time: O(n)
space: O(1)