摘要: Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any 阅读全文
posted @ 2017-10-13 05:46 jasminemzy 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2017-10-13 04:51 jasminemzy 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2017-10-13 02:49 jasminemzy 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Flatten a binary tree to a fake "linked list" in pre-order traversal. Here we use the right pointer in TreeNode as the nextpointer in ListNode. Notice 阅读全文
posted @ 2017-10-13 02:28 jasminemzy 阅读(148) 评论(0) 推荐(0) 编辑