Longest Substring Without Repeating Characters Longest Substring Without Repeating Characters Total Accepted: 167158 Total Submissions: 735821 Difficu ...
分类:
其他好文 时间:
2016-07-24 17:49:41
阅读次数:
149
Another interesting DP. Lesson learnt: how you define state is crucial.. 1. if DP[i] is defined as, longest wiggle(up\down) subseq AT number i, you wi ...
分类:
其他好文 时间:
2016-07-24 08:14:10
阅读次数:
155
这道题是比较常考的题目,求回文子串,一般有两种方法。 第一种方法比较直接,实现起来比较容易理解。基本思路是对于每个子串的中心(可以是一个字符,或者是两个字符的间隙,比如串abc,中心可以是a,b,c,或者是ab的间隙,bc的间隙)往两边同时进行扫描,直到不是回文串为止。假设字符串的长度为n,那么中心 ...
分类:
其他好文 时间:
2016-07-21 00:35:38
阅读次数:
152
Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequ ...
分类:
其他好文 时间:
2016-07-19 20:28:32
阅读次数:
134
Question: Longest Collatz sequence Problem 14 Problem 14 The following iterative sequence is defined for the set of positive integers: n → n/2 (n is e ...
分类:
其他好文 时间:
2016-07-17 12:13:03
阅读次数:
322
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 longes ...
分类:
其他好文 时间:
2016-07-15 00:03:09
阅读次数:
113
LeetCode OJ 3: Given a string, find the length of the longest substring without repeating characters. Given "abcabcbb", the answer is "abc", which the ...
分类:
其他好文 时间:
2016-07-12 21:00:52
阅读次数:
173
LIS是DP入门的一个基础题了 可以看这个,讲得很清晰 http://www.acmerblog.com/dp-3-longest-increasing-subsequence-4640.html n^2模板: nlogn讲解: http://www.acmerblog.com/lis-nlogn- ...
分类:
其他好文 时间:
2016-07-12 01:27:11
阅读次数:
128
Given a dictionary, find all of the longest words in the dictionary. Given a dictionary, find all of the longest words in the dictionary. Given a dict ...
分类:
其他好文 时间:
2016-07-10 07:36:42
阅读次数:
205