码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
76 Minimum Window Substring
76 Minimum Window Substring链接:https://leetcode.com/problems/minimum-window-substring/ 问题描述: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in...
分类:Windows程序   时间:2015-07-10 09:34:35    阅读次数:169
3 Longest Substring Without Repeating Characters
3 Longest Substring Without Repeating Characters链接:https://leetcode.com/problems/longest-substring-without-repeating-characters/ 问题描述: Given a string, find the length of the longest substring withou...
分类:其他好文   时间:2015-07-10 09:34:17    阅读次数:134
Longest Substring Without Repeating Characters 7 lines with c++ in 12ms
1 class Solution { 2 public: 3 int lengthOfLongestSubstring(string s) { 4 int len = s.length(), m = 0, l = 0, p[256] = { 0 }; 5 f...
分类:编程语言   时间:2015-07-10 02:11:53    阅读次数:139
[leedcode 32] 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...
分类:其他好文   时间:2015-07-09 17:29:41    阅读次数:106
30 Substring with Concatenation of All Words
30 Substring with Concatenation of All Words链接:https://leetcode.com/tag/hash-table/ 问题描述: You are given a string, s, and a list of words, words, that are all of the same length. Find all starting ind...
分类:其他好文   时间:2015-07-09 14:38:37    阅读次数:94
1040. Longest Symmetric String (25)
题目要求判断最长的回文,有两种思路可供选择。 思路一,从两头进行判断,定义两个指针start_index和end_index分别指向头部和尾部,首先固定start_index,让end_index从最后一个元素向前遍历,直到碰到start_index,其间对start_index到end_index的范围进行回文判断,回文判断的规则很简单,如果start和end指向的元素一样,回文长度length=2,然后start+1,end-1,继续比较,如果符合则继续+2,直到start<end不再满足,注意在这之中...
分类:其他好文   时间:2015-07-09 14:34:42    阅读次数:89
[leecode 30] Substring with Concatenation of All Words
You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatena...
分类:其他好文   时间:2015-07-09 14:26:16    阅读次数:137
[LeetCode][Java] Longest Common Prefix
题目: Write a function to find the longest common prefix string amongst an array of strings. 题意: 写出一个函数,找到一组数组中的最长公共子串。 算法分析: 需要构建两重循环。第一层是最短子串的长度,另一层是遍历字符串数组中的每个成员。 brute force的想法,以第一个字符串为标准,对于...
分类:编程语言   时间:2015-07-09 13:17:56    阅读次数:138
说说String这个类
public class Foo { public static void main(String[] args) { String strValue="ABCDEFG"; strValue.substring(3); strValue.concat("123"); System.out.println("result="...
分类:其他好文   时间:2015-07-09 11:19:39    阅读次数:98
Longest Consecutive Sequence
Longest Consecutive Sequence
分类:其他好文   时间:2015-07-08 22:15:54    阅读次数:137
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!