摘要: 题目: 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 阅读全文
posted @ 2016-01-29 18:02 很好玩 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ B 阅读全文
posted @ 2016-01-29 14:58 很好玩 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 利用border特性,实现三角形,很简单,我们直接看效果: html: <div class="bubble-container ">你好么 <div class="bubble-tail"></div> </div> css: .bubble-container { height: 100px; 阅读全文
posted @ 2016-01-29 14:25 很好玩 阅读(697) 评论(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 l 阅读全文
posted @ 2016-01-29 11:17 很好玩 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and 阅读全文
posted @ 2016-01-29 10:52 很好玩 阅读(264) 评论(0) 推荐(0) 编辑