原题如下: 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 ...
分类:
其他好文 时间:
2016-08-15 18:59:55
阅读次数:
146
[题目] 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 farth ...
分类:
其他好文 时间:
2016-08-14 14:22:35
阅读次数:
92
原文 http://xuanwo.org/2015/07/31/dp-lis/ 主题 动态规划 原文 http://xuanwo.org/2015/07/31/dp-lis/ 主题 动态规划 介绍 最长上升子序列问题,也就是 Longest increasing subsequence ,缩写为LI ...
分类:
其他好文 时间:
2016-08-14 07:24:45
阅读次数:
135
https://leetcode.com/problems/longest-palindromic-substring/ 题目:求字符串最长回文串。 第一种思路:以每一个字符为回文串中间的字符时,最长的回文串。考虑回文串字符个数为奇数,偶数的2种情况。 x--,j++ 的向两边扩展,判断最长的回文串 ...
分类:
其他好文 时间:
2016-08-13 21:08:35
阅读次数:
113
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 l ...
分类:
其他好文 时间:
2016-08-13 19:34:06
阅读次数:
98
Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. Clarification What's the de ...
分类:
其他好文 时间:
2016-08-13 06:35:11
阅读次数:
361
Description Peter has a sequence and he define a function on the sequence -- , where is the length of the longest increasing subsequence ending with . ...
分类:
其他好文 时间:
2016-08-12 19:44:17
阅读次数:
213
14.LongestCommonPrefixWriteafunctiontofindthelongestcommonprefixstringamongstanarrayofstrings.题目大意:求一组字符串的最长前缀。代码如下:classSolution{
public:
stringlongestCommonPrefix(vector<string>&strs){
if(strs.size()==0)
return"";
intminStr..
分类:
其他好文 时间:
2016-08-10 23:03:56
阅读次数:
186
# 题目 3. Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. Examples ...
1 redis简介及安装 1.1 Redis是什么 REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统。 首先需要了解,Redis的一些数据结构,包括 lists, sets, ordered sets 以及 ...
分类:
其他好文 时间:
2016-08-10 22:28:56
阅读次数:
133