码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
Palindrome Partitioning II--LeetCode
题目: Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = "aab"...
分类:其他好文   时间:2015-04-11 18:01:45    阅读次数:137
Palindrome Partitioning--LeetCode
题目: 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 ...
分类:其他好文   时间:2015-04-11 16:22:37    阅读次数:129
leetcode Longest Common Prefix
如果字符串数组只有一个,那么最长前缀就是它本身;如果有多个,我们把第一个设为当前最长前缀,拿当前最长前缀去和第二个比较,再选出最长前缀,一次往后即可!代码:#include#include#includeusing namespace std;string longestCommonPrefix(v...
分类:其他好文   时间:2015-04-11 16:09:23    阅读次数:131
[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 longest...
分类:其他好文   时间:2015-04-11 01:18:51    阅读次数:113
Leetcode Minimum Window Substring
题目地址:https://leetcode.com/problems/minimum-window-substring/题目解答:import java.util.HashMap;import java.util.Map;public class Solution { public Strin...
分类:Windows程序   时间:2015-04-11 01:10:44    阅读次数:240
c#中的String类以及类型转换
C#string类方法IndexOf(字符或者字符串),返回查找字符(串)的位置,从零开始,如果没有,则返回-1;SubString(开始位置,长度),截取字符串,ToUpper()ToLower()Split():变量名.Split(char型分隔符)Join():String.Join(连接符,...
分类:Windows程序   时间:2015-04-10 23:49:48    阅读次数:202
leetcode-14 Longest Common Prefix
?? 问题描述:Write a function to find the longest common prefix stringamongst an array of strings. 问题分析: 代码: public class Solution { public String longestCommonPrefix(String[] strs) { ...
分类:其他好文   时间:2015-04-10 22:11:48    阅读次数:106
BZOJ 2555 Substring 题解
题意:给你一个字符串init,要求你支持两个操作(1):在当前字符串的后面插入一个字符串(2):询问字符串s在当前字符串中出现了几次?(作为连续子串) 必须在线。构建SAM,再用LCT维护Parent Tree。每次新加一个结点,对它的祖先的Right集合大小都加了1,(Right集合的定义见CL....
分类:其他好文   时间:2015-04-10 19:51:34    阅读次数:233
【leetcode】Longest Consecutive Sequence(hard)☆
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-04-10 19:43:32    阅读次数:102
leetcode problem (2-4)
Problem 2 ---Add Two Numbers简单的模拟题。Problem 3 ---Longest Substring Without Repeating Characters题意: 给定一个字符串序列,找出最长无重复的子序列。如"abcabcbb"的最长不重复子序列为"abc"思路: ...
分类:其他好文   时间:2015-04-10 19:28:51    阅读次数:100
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!