[程序员面试金典 C++实现]面试题 02.01. 移除重复节点
自己无脑AC的代码:
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* removeDuplicateNodes(ListNode* head) {
unordered_set<int> hash_set;
ListNode * p = head,*loc ......