码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
Longest Substring Without Repeating Characters
https://leetcode.com/problems/longest-substring-without-repeating-characters/Given a string, find the length of the longest substring without repeatin...
分类:其他好文   时间:2015-05-03 13:14:25    阅读次数:121
slice与substring与substr
substr(begin,end): begin表示起始index,end表示提取几位substring(begin,end):begin表示起始index,end表示结束index。slice(begin,end):同substring。slice与substring区别:1、substring中...
分类:其他好文   时间:2015-05-02 20:40:51    阅读次数:130
checkbox的value存入数据库及回显
后台接收值String[]ctrltypes=request.getParameterValues("ctrltypes"); Stringstr1=newString(); if(ctrltypes.length>0){ for(inti=0;i<ctrltypes.length;i++){ str1+=ctrltypes[i]+","; } tabUsers.setCtrltypes(str1.substring(0,str1.length()-1)..
分类:数据库   时间:2015-05-02 18:18:01    阅读次数:269
最长回文串:LeetCode:Longest Palindromic Substring
class Solution {public: string longestPalindrome(string s) { int length=s.length(); int maxlen=0; int start=0; bool fla...
分类:其他好文   时间:2015-05-02 18:05:53    阅读次数:116
SQL Server基本函数
1.字符串函数长度与分析用1,datalength(Char_expr)返回字符串包含字符数,但不包含后面的空格2,substring(expression,start,length)取子串,字符串的下标是从“1”,start为起始位置,length为字符串长度,实际应用中以len(expressi...
分类:数据库   时间:2015-05-02 12:24:41    阅读次数:148
N - Longest Ordered Subsequence POJ 2533 (最长上升子序列 )
N - Longest Ordered Subsequence Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2533 Description A numeric sequence of ai is ordered if a1 < a2 < ...
分类:其他好文   时间:2015-05-02 11:14:23    阅读次数:125
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 longest ...
分类:其他好文   时间:2015-05-01 18:42:06    阅读次数:121
LeetCode 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 leaf node. 题意:求树的高度。 思路:就是递归。 /** * Definiti...
分类:其他好文   时间:2015-05-01 12:06:48    阅读次数:163
(字符串)最长公共字串(Longest-Common-SubString,LCS)
题目:给定两个字符串X,Y,求二者最长的公共子串,例如X=[aaaba],Y=[abaa]。二者的最长公共子串为[aba],长度为3。子序列是不要求连续的,字串必须是连续的。思路与代码:1、简单思想:遍历两个字符串X、Y,分别比较X的字串与Y的字串,求出最长的公共字串。设X长度为m,Y长度为n,最长...
分类:其他好文   时间:2015-05-01 11:58:58    阅读次数:179
Palindrome Partitioning
题目:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, ...
分类:其他好文   时间:2015-05-01 00:32:38    阅读次数:150
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!