摘要: Merge k sorted linked lists and return it as one sorted list.Analyze and describe its complexity.ExampleGiven lists:[ 2->4->null, null, -1->null],retu 阅读全文
posted @ 2018-09-06 07:59 jasminemzy 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given some points and a point origin in two dimensional space, find k points out of the some points which are nearest to origin. Return these points s 阅读全文
posted @ 2018-09-06 06:03 jasminemzy 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find the top k largest numbers in it. Example Given [3,10,1000,-99,4,100] and k = 3. Return [1000, 100, 10]. 1.用堆数据结构。O(nlogk) 阅读全文
posted @ 2018-09-06 03:43 jasminemzy 阅读(257) 评论(0) 推荐(0) 编辑