leetcode - 82. Remove Duplicates from Sorted List II-Solution

Use a prev to record the previous node, and if the current node is duplicated by the next node, delete them. Otherwise move prev forward.

Time complexity: o ( n ) o(n) o(n)
Space complexity: o ( 1 ) o(1) o(1)

上一篇:Docker下部署socks5和pptp服务端,实现代理上网