码迷,mamicode.com
首页 >  
搜索关键字:substring    ( 3892个结果
[snippet] get parameter
function(name) { var query=location.search.substring(1); var pairs=query.split("&"); for(var i=0;i<pairs.length;i++) ...
分类:其他好文   时间:2014-05-19 10:43:27    阅读次数:266
【leetcode】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...
分类:其他好文   时间:2014-05-18 19:39:55    阅读次数:355
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
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 if s2 is a rotation of s1 using only one...
分类:其他好文   时间:2014-05-16 01:50:08    阅读次数:311
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
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-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
迷上了代码!