码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
Leetcode | 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 longes...
分类:其他好文   时间:2014-05-16 21:15:37    阅读次数:454
lightoj 1427 - Substring Frequency (II) AC自动机
模板题,找来测代码。注意有相同单词//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#inc...
分类:其他好文   时间:2014-05-16 05:45:11    阅读次数:403
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...
分类:其他好文   时间:2014-05-15 17:50:38    阅读次数:298
Java编程最差代码
字符串连接误用 错误的写法:String s = ""; for (Person p : persons) { s += ", " + p.getName(); } s = s.substring(2); //remove first comma 正确的写法:StringBuilde...
分类:编程语言   时间:2014-05-15 17:38:49    阅读次数:493
最长递增子序列(LIS)求解
问题描述 最长递增子序列也称 “最长上升子序列”,简称LIS ( longest increasing subsequence)。设L=是n个不同的实数的序列,L的递增子序列是这样一个子序列Lis=,其中k1 如:求一个一维数组arr[i]中的最长递增子序列的长度,如在序列{ 7, 1, 6, 5, 3, 4, 8 }中,最长递增子序列长度为4,其递增子序列为:1,3,4,8。...
分类:其他好文   时间:2014-05-15 15:06:59    阅读次数:328
LeetCode-003 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 3. For "bbbbb" the longest substring is "b", with the len...
分类:其他好文   时间:2014-05-15 14:40:14    阅读次数:320
打印HTML页面部分区域javascript代码
1 function preview(oper) { 2 if (oper "; //设置打印开始区域 5 eprnstr = ""; //设置打印结束区域 6 prnhtml = bdhtml.substring(bdhtm...
分类:编程语言   时间:2014-05-15 14:31:49    阅读次数:485
[LeetCode]Longest Common Prefix
Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings....
分类:其他好文   时间:2014-05-15 13:27:07    阅读次数:233
LeetCode-005 Longest Palindromic Substrin
【题目】 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中最长回文子串,S最长为1000,保证有唯一解 【思路】 原字符串用特殊字符#间隔,如下所示: #a...
分类:其他好文   时间:2014-05-15 03:31:25    阅读次数:299
leetcode题目:Palindrome Partitioning 和Palindrome Partitioning II
题目一: 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 [ ...
分类:其他好文   时间:2014-05-14 15:10:01    阅读次数:293
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!