摘要:
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1->2->5" 阅读全文
posted @ 2017-01-29 12:14
璨璨要好好学习
阅读(109)
评论(0)
推荐(0)
摘要:
Given a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 \ 3 \ 4 阅读全文
posted @ 2017-01-29 09:18
璨璨要好好学习
阅读(165)
评论(0)
推荐(0)
摘要:
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2017-01-29 06:13
璨璨要好好学习
阅读(158)
评论(0)
推荐(0)

浙公网安备 33010602011771号