Remove Duplicates from Sorted List
摘要:
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if(head) { ListNode *p,*q; p=head; ... 阅读全文
posted @ 2014-03-06 21:21 crane_practice 阅读(112) 评论(0) 推荐(0) 编辑