递归
子长
这个作者很懒,什么都没留下…
展开
-
10. Regular Expression Matching (9月11日)
10. Regular Expression Matching ‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The func转载 2017-09-11 20:49:36 · 212 阅读 · 0 评论 -
513. Find Bottom Left Tree Value
Given a binary tree, find the leftmost value in the last row of the tree.Example 1: Input: 2 / \ 1 3 Output: 1 Example 2: Input: 1 / \ 2 3 / / \ 4 5 6 / 7 Output: 7 Not原创 2017-10-06 17:03:54 · 199 阅读 · 0 评论 -
241. Different Ways to Add Parentheses
241. Different Ways to Add ParenthesesGiven a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid opera原创 2017-09-12 15:43:41 · 154 阅读 · 0 评论 -
算法期中1002. 合并二叉树
Description 输入两个二叉树T1和T2,要求对T1和T2进行合并. 合并是指将二叉树同一位置节点上的数求和,作为合并后二叉树相应位置节点的数值. 如果某个位置上只有一个二叉树有节点,则合并后的二叉树对应位置上的节点上的数值就等于这个节点上的数值.例如: T1 T2 1原创 2017-11-13 19:24:47 · 264 阅读 · 0 评论 -
647. Palindromic Substrings
题目:Given a string, your task is to count how many palindromic substrings in this string.The substrings with different start indexes or end indexes are counted as different substrings even they consist原创 2017-11-27 17:28:46 · 151 阅读 · 0 评论 -
46. Permutations
Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2原创 2018-01-09 20:51:00 · 133 阅读 · 0 评论