Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-06-14 16:30:11
阅读次数:
79
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest ...
分类:
其他好文 时间:
2015-06-14 13:50:36
阅读次数:
91
The Longest Common Subsequence (LCS) problem is as follows:Given two sequences s andt, find the length of the longest sequence r, which is a subsequen...
分类:
其他好文 时间:
2015-06-14 00:30:15
阅读次数:
177
1. Question求最长回文子串Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists...
分类:
其他好文 时间:
2015-06-12 23:49:08
阅读次数:
228
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-06-12 23:40:02
阅读次数:
121
题目链接 题目要求: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the ar...
分类:
其他好文 时间:
2015-06-12 11:29:03
阅读次数:
100
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-06-12 00:33:10
阅读次数:
122
题目链接 题目要求: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array[...
分类:
其他好文 时间:
2015-06-11 21:13:17
阅读次数:
105
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.求最大深度,用递归的方法/**
* Definition for a binary...
分类:
其他好文 时间:
2015-06-11 19:26:53
阅读次数:
126
Max TreeGiven an integer array with no duplicates. A max tree building on this array is defined as follow:The root is the maximum number in the arrayT...
分类:
其他好文 时间:
2015-06-11 18:58:01
阅读次数:
228