摘要: 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 sum 阅读全文
posted @ 2017-02-20 21:23 Pacific-hong 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 思路:才用快慢指针,找到中间节点,然后递归处理。 accepted code: 阅读全文
posted @ 2017-02-20 13:56 Pacific-hong 阅读(114) 评论(0) 推荐(0) 编辑