qingcheng奕 |
|
||
2013年12月3日
摘要:
http://oj.leetcode.com/problems/remove-duplicates-from-sorted-list/链表的去重,要考虑链表的本质。#include using namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} };class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if(!head) ... 阅读全文
|
Copyright © 2024 qingcheng奕
Powered by .NET 8.0 on Kubernetes |