码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
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-07-04 15:14:10    阅读次数:107
Binary String Matching
描述:Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as a substring of B? For...
分类:其他好文   时间:2015-07-04 10:57:26    阅读次数:99
CareerCup它1.8 串移包括问题
【称号】原文:1.8 Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check ...
分类:其他好文   时间:2015-07-03 20:29:20    阅读次数:138
Leetcode:Longest Palindromic Substring之详细分析
原题链接: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 there exis...
分类:其他好文   时间:2015-07-03 10:45:37    阅读次数:146
LeetCode_Disjoint-Set_Longest Consecutive Sequence
128. Longest Consecutive Sequence1. 问题描述:输入一个未排序的整型数组,找到最长的连续元素序列,并返回其长度。2. 解决思路:拿到这道题,首先想到是先排序,然后遍历找到连续最长的元素。但是我们想通过更好的方式去解决这个问题。所以想到用HashMap存储每个节点的值和这个节点所在序列的长度。当遍历到每个元素时,找当前Map中是否有这个元素的左右连续元素存在,然后计算...
分类:其他好文   时间:2015-07-03 09:16:54    阅读次数:103
Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid parentheses substring is "()", ...
分类:其他好文   时间:2015-07-03 00:20:43    阅读次数:143
【LeetCode】 Longest Common Prefix
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.题目的意图It seems that it is not to check betwe...
分类:其他好文   时间:2015-07-01 17:35:29    阅读次数:132
JAVA字符串的优化
Java 程序优化:字符串操作、基本运算方法等优化策略 看了这篇文档,略有所感,所以本篇算是一个读后感。和上篇JAVA一种提升输出速度的方法 进一步。 主要涉及了7种优化方式。 1.subString(begin,end): subString是截取String中一段的方法,我在这个上面还吃过苦头的,之前做过一个大数据量的subString一直OOM,没找到解决办法,今天看到文中提到如果使用...
分类:编程语言   时间:2015-07-01 16:06:32    阅读次数:167
Longest Valid Parentheses
这道题好理解,但是要自己想的话还是很难想出来的,动态规划说白了就是记录当前的结果,留给后面的用。求最长合法匹配的长度,这道题可以用一维动态规划逆向求解。假设输入括号表达式为String s,维护一个长度为s.length的一维数组dp[],数组元素初始化为0。 dp[i]表示从s[i]到s[s.le...
分类:其他好文   时间:2015-07-01 15:45:27    阅读次数:124
[JSP][JSTL]页面调用函数--它${fn:}内置函数、是推断字符串是空的、更换车厢
页面中调用函数--之${fn:}内置函数函数描写叙述fn:contains(string, substring) 假设參数string中包括參数substring,返回truefn:containsIgnoreCase(string, substring) 假设參数string中包括參数substr...
分类:Web程序   时间:2015-07-01 13:54:55    阅读次数:149
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!