meta标签width,viewport宽度height,viewport高度initial-scale,初始缩放比例minimum-scale,最小缩放比例maximum-scale,最大缩放比例user-scalable,用户是否可以手动缩放base标签为页面上所有链接规定默认链接和默认目标。h...
分类:
Web程序 时间:
2015-07-07 12:20:50
阅读次数:
136
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...
分类:
其他好文 时间:
2015-07-06 19:44:47
阅读次数:
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.
解题:
求最大深度 和前面一题类似 用递归遍历就...
分类:
编程语言 时间:
2015-07-06 16:06:14
阅读次数:
143
题目:
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