2018年3月27日

摘要: 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 a 阅读全文
posted @ 2018-03-27 10:23 codingEskimo 阅读(126) 评论(0) 推荐(0)
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 时间复杂度 O(nlogk)思路: 这道题其实有三种做法,第一种是priorityQueue,第二种是 阅读全文
posted @ 2018-03-27 09:02 codingEskimo 阅读(115) 评论(0) 推荐(0)

导航