摘要:
Problem Description:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equ... 阅读全文
摘要:
Problem Description:Given a binary tree, flatten it to a linked list in-place.Solution:对二叉树进行前序遍历(pre-order). 1 public void flatten(TreeNode root) { 2... 阅读全文
摘要:
Problem Desciption : Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is... 阅读全文