摘要:
class Solution { public: ListNode* mergeKLists(vector& lists) { ListNode* head = NULL; ListNode* current = NULL; for (int i = 0; i val; int min_index = 0; ... 阅读全文
摘要:
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* m... 阅读全文
摘要:
class Solution { public: vector> threeSum(vector& nums) { sort(nums.begin(), nums.end()); vector > validSet; for (int i = 0; i = 1 && nums[i] == nums[i-1])continu... 阅读全文