码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
C#字符串截取
string str="123abc456"; int i=3; 1 取字符串的前i个字符 str=str.Substring(0,i); // orstr=str.Remove(i,str.Length-i); 2 去掉字符串的前i个字符: str=str.Remove(0,i);// or s....
分类:Windows程序   时间:2015-01-11 14:44:20    阅读次数:253
Longest Valid Parentheses
难点1,是栈,2是流程class Solution {public: int longestValidParentheses(string s) { stack mstack; char cbefore; int count = 0; if(s.empt...
分类:其他好文   时间:2015-01-11 12:14:33    阅读次数:119
htm上传文件
常常使用上传文件 不同浏览器上显示的按钮区别很是差点 这日在网上查了许多 得写了一简单明了的上传 文件上传 function imgChange(imgvalue){ imgvalue=imgvalue.value.substring(imgvalue.value.indexOf("fakepath"), imgvalue.value.leng...
分类:Web程序   时间:2015-01-11 09:37:31    阅读次数:202
[LeetCode#104, 111]Maximum Depth of Binary Tree, Minimum Depth of Binary Tree
The problem 1: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 t...
分类:其他好文   时间:2015-01-11 06:07:49    阅读次数:216
spoj 7258
Lexicographical Substring SearchTime Limit: 1000MSMemory Limit: Unknown64bit IO Format: %lld & %lluDescriptionLittle Daniel loves to play with strings...
分类:其他好文   时间:2015-01-10 22:14:19    阅读次数:301
poj 3415
Common SubstringsTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 7605Accepted: 2524DescriptionA substring of a string T is defined as:T(i, k)...
分类:其他好文   时间:2015-01-10 22:12:08    阅读次数:295
[LeetCode] Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes...
分类:其他好文   时间:2015-01-09 22:08:16    阅读次数:178
spoj 1812
1812. Longest Common Substring IIProblem code: LCS2A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the s...
分类:其他好文   时间:2015-01-09 22:06:32    阅读次数:339
LeetCode---Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. Solution: class Solution { public: string longestCommonPrefix(vector &strs) { vector s = strs...
分类:其他好文   时间:2015-01-09 09:17:16    阅读次数:122
Minimum Window Substring
双指针思想,尾指针不断往后扫,当扫到有一个窗口包含了所有T的字符,然后再收缩头指针,直到不能再收缩为止。最后记录所有可能的情况中窗口最小的...
分类:Windows程序   时间:2015-01-09 00:17:50    阅读次数:278
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!