![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
刷题
qq_33935254
这个作者很懒,什么都没留下…
展开
-
Path Sum 二叉树中和为某一值的路径
Leetcode 112/113/437. Path Sum 参考:剑指offer 26:二叉树中和为某一值的路径 112:Given a binary tree and a sum, determineif the tree has a root-to-leaf path such that adding up all the values alongthe path equal原创 2017-06-06 17:58:58 · 485 阅读 · 0 评论 -
Leetcode 23. Merge k Sorted Lists合并k个排序链表
题目:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 合并k个排序链表。 首先想到的是最简单的方法:遍历每个链表的头节点,找到最小的那个头节点加入到要输出链表的结尾(需要注意代码的鲁棒性,考虑输入有null链表的情况):/** * Definit原创 2017-06-02 12:18:42 · 441 阅读 · 0 评论