23.Merge k Sorted Lists (Array, Queue; Sort)
摘要:
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 思路I: 选择排序 每次都比较各个list的头指针所指的val,取最小的那个。时间复杂度O(n*k) 阅读全文
posted @ 2015-08-11 18:45 joannae 阅读(202) 评论(0) 推荐(0) 编辑