List
sysu_xiamengyou
这个作者很懒,什么都没留下…
展开
-
三、[LeetCode OJ]Add Two Numbers
【问题描述】You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers原创 2017-02-25 20:40:26 · 357 阅读 · 0 评论 -
[LeetCode OJ]Merge k Sorted Lists
【问题描述】Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.问题来源:Merge k Sorted Lists【解题分析】将k个有序的数组合并成一个有序的数组,将其分而治之,每次只比较两个数组,简易图为:原创 2017-03-09 21:46:32 · 262 阅读 · 0 评论 -
[LeetCode OJ]Swap Nodes in Pairs
【问题描述】Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only const原创 2017-06-04 21:33:11 · 262 阅读 · 0 评论