摘要: 2. Add Two Numbers 问题描述 You are given two non empty linked lists representing two non negative integers. The digits are stored in reverse order and ea 阅读全文
posted @ 2018-09-05 13:23 banshaohuan 阅读(114) 评论(0) 推荐(0)
摘要: 23. 合并K个排序链表 描述 合并 k 个排序链表,返回合并后的排序链表。请分析和描述算法的复杂度。 示例 输入: [ 1 4 5, 1 3 4, 2 6 ] 输出: 1 1 2 3 4 4 5 6 思路 思路一 这道题是第 21 道题的升级版,所以可以借助第 21 题的算法。 方法是重复将列表中 阅读全文
posted @ 2018-09-05 13:20 banshaohuan 阅读(178) 评论(0) 推荐(0)