257. Binary Tree Paths
摘要:Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: //如果有子节点,字符串随着递归一直累加,直到没
阅读全文
posted @
2017-09-28 14:27
王早
阅读(101)
推荐(0)
226. Invert Binary Tree
摘要:Invert a binary tree. to Trivia:This problem was inspired by this original tweet by Max Howell: 方法一:递归 方法二:非递归,栈
阅读全文
posted @
2017-09-26 11:41
王早
阅读(83)
推荐(0)
111. Minimum Depth of Binary Tree
摘要: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-09-24 08:42
王早
阅读(75)
推荐(0)
101. Symmetric Tree
摘要:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet
阅读全文
posted @
2017-09-23 09:12
王早
阅读(71)
推荐(0)
Combination Sum
摘要:39、combination sum1 Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the can
阅读全文
posted @
2017-09-15 17:08
王早
阅读(99)
推荐(0)