码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
poj - 3764 - The xor-longest Path(Trie)
题意:一棵 n 个结点的树,树边有权值w(0 题目链接:http://poj.org/problem?id=3764 ——>>取0为根,预处理出所有结点到根的异或xOr[i]。那么结点 a 与结点 b 之间的路径异或就是xOr[a] ^ xOr[b]。。 权值 w 最多31位,于是,将每个xOr的二进制表示从高位到低位插入到 01 Trie中(0为0,非0为1)。。 查询时从高位开始贪心...
分类:其他好文   时间:2014-11-22 10:40:33    阅读次数:230
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...
分类:其他好文   时间:2014-11-22 08:08:34    阅读次数:207
The substring() Method in JDK 6 and JDK 7
The substring() Method in JDK 6 and JDK 7...
分类:其他好文   时间:2014-11-22 07:05:40    阅读次数:274
Longest Consecutive Sequence
Problem StatementGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example, Given [100, 4, 200, 1,...
分类:其他好文   时间:2014-11-22 01:57:26    阅读次数:190
UVA - 10285 Longest Run on a Snowboard
从任意点出发,走出一条严格递减的序列出来,看最长序列是多长 #include #include #include #include #include #include #include #include #include #include using namespace std; int a[110][110]; int dp[110][110]; int dx[4]={0,0,-1,1};...
分类:其他好文   时间:2014-11-21 21:58:23    阅读次数:203
LeetCode: Longest Valid Parentheses 解题报告
Longest Valid ParenthesesGiven a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses sub...
分类:其他好文   时间:2014-11-21 20:31:10    阅读次数:235
Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-11-21 18:34:47    阅读次数:167
1.8 Is Rotation
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 .....
分类:其他好文   时间:2014-11-21 15:51:15    阅读次数:232
Leetcode-Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the lon...
分类:其他好文   时间:2014-11-21 14:00:49    阅读次数:172
asp.net字符串取前几位字符串
asp.net字符串取前几位的时候总是很繁琐,于是我想了个偷懒的办法,代码如下: str.ToString().PadRight(20).Substring(0,10).Trim()
分类:Web程序   时间:2014-11-20 11:57:44    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!