摘要:
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 阅读全文
摘要:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 思路:才用快慢指针,找到中间节点,然后递归处理。 accepted code: 阅读全文