码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
BZOJ 2555 SubString 后缀自动机
题目大意:给出一个字符串,支持在线在字符串后面加一个字符串,查询一个字符串在串中出现过几次。 思路:如果不想写正解的话,这个题就是后缀自动机的简单应用。正解其实是LCT+SAM,但是时间比暴力慢一倍。。。 暴力就很简单了,正序建立后缀自动机,每次查询的时候找到位置直接输出size的值。注意两点,一个是分裂节点的时候,size也要复制过去。查询的时候发现找不到要return 0; ...
分类:其他好文   时间:2015-01-19 21:08:55    阅读次数:225
[LeetCode][Python]14: Longest Common Prefix
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/longest-common-prefix/14: Longest Common PrefixWrite a fu...
分类:编程语言   时间:2015-01-19 20:39:03    阅读次数:205
数据库中substring的使用方法 CONVERT(varchar(12) , getdate(), 112 )
Sqlserver中经常要操作一些时间类型的字段转换,我又不太记得住,所以搜集了以下的一些SqlserverConvertDateTime相关的资料发表在自己的小站里,方便自己以后要用的时候寻找,望对大家也有帮助.将sqlserver中table表的[datetime]字段值‘2007-11-071...
分类:数据库   时间:2015-01-19 09:12:05    阅读次数:634
Longest Substring Without Repeating Characters
https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/Given a string, find the length of the longest substring without repea...
分类:其他好文   时间:2015-01-18 23:57:54    阅读次数:264
[leetcode]131 Palindrome Partitioning
问题描述: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [...
分类:其他好文   时间:2015-01-18 18:36:06    阅读次数:158
[C++]LeetCode: 105 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 for "abcabcbb" is "abc", which the length is ...
分类:编程语言   时间:2015-01-17 18:10:44    阅读次数:251
【leetcode】Substring with Concatenation of All Words
Substring with Concatenation of All WordsYou are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices o...
分类:其他好文   时间:2015-01-16 23:39:36    阅读次数:225
NYOJ 36 最长公共子序列
最长公共子序列时间限制:3000 ms | 内存限制:65535 KB 难度:3描述咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个...
分类:其他好文   时间:2015-01-16 16:00:46    阅读次数:145
[leetcode] Palindrome Partitioning
Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioni...
分类:其他好文   时间:2015-01-16 13:02:05    阅读次数:154
[C++]LeetCode: 99 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 exists one unique longest palindromic substring. 思路:题目要求的s的一个最长回...
分类:编程语言   时间:2015-01-15 23:54:08    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!