个人博客:https://luxialan.com

摘要: First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Yo... 阅读全文
posted @ 2015-04-09 17:13 luxialan 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Insertion Sort ListSort a linked list using insertion sort.很简单的一道题,思路跟数组的插入排序一样/** * Definition for singly-linked list. * struct ListNode { * int ... 阅读全文
posted @ 2015-04-09 11:26 luxialan 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Merge k Sorted ListsMergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity./** * Definition for singly-linked... 阅读全文
posted @ 2015-04-09 09:35 luxialan 阅读(98) 评论(0) 推荐(0) 编辑