题目:
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 one unique longest palindromic substring.
题意:
给定字符串S...
分类:
编程语言 时间:
2015-07-06 12:30:14
阅读次数:
115
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.Hide Tags: Tree ,Depth-first Search/**
* D...
分类:
其他好文 时间:
2015-07-06 12:29:01
阅读次数:
112
这道题有两个思路, 一是沿用085的maximum rectangle的思路, 稍作改进即可, 代码如下, 这个方法运行192msclass Solution: # @param {character[][]} matrix # @return {integer} def maxi...
分类:
其他好文 时间:
2015-07-06 08:51:45
阅读次数:
136
解法一:递归1 int maxDepth(TreeNode* root)2 {3 if (root == NULL)4 return 0;5 6 int max_left_Depth = maxDepth(root->left);7 int max_right...
分类:
其他好文 时间:
2015-07-05 18:31:24
阅读次数:
101
题目:输入一个整型数组,数组里有正数也有负数。数组中一个或多个整数组成一个子数组。求所有子数组的和的最大值。要求时间复杂度为O(N)。参见LeetCode-Maximum Subarray。
分类:
编程语言 时间:
2015-07-05 16:40:36
阅读次数:
124
题目: 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 one unique lo...
分类:
其他好文 时间:
2015-07-04 18:11:21
阅读次数:
119
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class...
分类:
其他好文 时间:
2015-07-03 12:29:21
阅读次数:
132
原题链接:https://leetcode.com/problems/longest-palindromic-substring/
题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exis...
分类:
其他好文 时间:
2015-07-03 10:45:37
阅读次数:
146
ecshop运行超过30秒超时的限制解决办法ECSHOP模板/ecshop开发中心(www.68ecshop.com) / 2014-06-04ecshop运行超过服务器默认的设置30秒的限制时会出现类似的报错Fatal error: Maximum execution time of 30 sec...
分类:
其他好文 时间:
2015-07-02 13:37:53
阅读次数:
98
LeetCode_Binary Tree Maximum Path Sum 解题思路...
分类:
其他好文 时间:
2015-07-01 23:43:24
阅读次数:
242