码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
LeetCode 5:Longest Palindromic Substring(最长回文串)
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2015-06-12 00:33:10    阅读次数:122
Leetcode[104]-Maximum Depth of Binary Tree
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.求最大深度,用递归的方法/** * Definition for a binary...
分类:其他好文   时间:2015-06-11 19:26:53    阅读次数:126
Latched 3 Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2015-06-11 18:25:40    阅读次数:104
bzoj 1318: [Spoj744] Longest Permutation 智商题
1318: [Spoj744] Longest PermutationTime Limit: 10 SecMemory Limit: 162 MBSubmit: 361Solved: 215[Submit][Status][Discuss]Description给你一个序列A含有n个正整数(1#in...
分类:其他好文   时间:2015-06-11 18:23:22    阅读次数:141
最长回文子串-LeetCode 5 Longest Palindromic Substring
题目描述Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longes...
分类:其他好文   时间:2015-06-11 12:36:10    阅读次数:110
No.14 Longest Common Prefix
No.14 Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.求一组string的最长公共前缀想法:找到最短的那个,然后依次对比典型的字...
分类:其他好文   时间:2015-06-10 15:28:49    阅读次数:107
leetcode中几道与维护窗口相关的问题
leetcode中有几道题使用同一个思路,大致是先维护一个窗口,每次只移动窗口左侧或者右侧的边界,然后针对这个窗口内的元素进行处理。这种方式使用两个指针,可以将问题的运行时间降到O(n)内。Longest Substring Without Repeating Characters:https://...
分类:其他好文   时间:2015-06-10 06:34:45    阅读次数:412
Maximum Depth of Binary Tree
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 le...
分类:其他好文   时间:2015-06-10 06:33:56    阅读次数:99
Longest Substring Without Repeating Characters2015年6月9日
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2015-06-09 16:59:44    阅读次数:135
[LeetCode] Longest Palindromic Substring
This problem has a long story. There are just too many solutions on the web and it can be studied for a long time before you fully grasp it. Morever, ...
分类:其他好文   时间:2015-06-08 22:53:39    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!