题目链接: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 ...
分类:
其他好文 时间:
2016-05-30 14:53:40
阅读次数:
150
题目 给出一数组A,编号从1到n,然后进行q次查询,每次查询给出一个边界[beg, end],要求给出数组A中范围[beg, end]之内的最小值。 题目链接: RMQ_ST 分析 区间问题使用线段树或者树状数组,可以达到查询复杂度为O(logN),其实对于RMQ(Range Maximum/Min ...
分类:
编程语言 时间:
2016-05-30 00:38:57
阅读次数:
191
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro ...
分类:
其他好文 时间:
2016-05-29 13:42:14
阅读次数:
219
基本在网页头部我们只需添加四个meta标签就可以实现一个手机网站的框架。我一起来看看是哪些meta标签。 1、添加viewport标签 1 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-sc ...
分类:
移动开发 时间:
2016-05-28 10:02:16
阅读次数:
197
题目链接:https://leetcode.com/problems/maximum-product-of-word-lengths/题目:
Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common...
分类:
其他好文 时间:
2016-05-27 12:57:27
阅读次数:
104
Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique i ...
分类:
其他好文 时间:
2016-05-26 13:08:23
阅读次数:
191
Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t ...
分类:
其他好文 时间:
2016-05-25 22:00:13
阅读次数:
147
题意:给定两个字符串,让你找出它们之间最长公共子序列(LCS)的长度。 析:很明显是个DP,就是LCS,一点都没变。设两个序列分别为,A1,A2,...和B1,B2..,d(i, j)表示两个字符串LCS长度。 当A[i] = B[j] 时,这个最长度就是上一个长度加1,即:d(i, j) = d( ...
分类:
其他好文 时间:
2016-05-25 01:50:45
阅读次数:
164
Find the maximum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1990 Accepted Submission(s): 837 ...
分类:
其他好文 时间:
2016-05-24 13:29:48
阅读次数:
213