码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
LCIS
Problem Description Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the longest consecutive increasing subsequenc...
分类:其他好文   时间:2015-08-09 00:30:43    阅读次数:127
【LeetCode】14 - Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.Solution: 1 class Solution { 2 public: 3 string longestCommo...
分类:其他好文   时间:2015-08-09 00:18:55    阅读次数:105
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...
分类:其他好文   时间:2015-08-09 00:17:57    阅读次数:86
URAL 1989 Subpalindromes(回文串 线段树 多项式hash)
1989. Subpalindromes Time limit: 0.5 second Memory limit: 64 MB You have a string and queries of two types: replace i’th character of the string by character a;check if substring sj...sk i...
分类:其他好文   时间:2015-08-08 18:22:03    阅读次数:160
上传图片的方法以及判断
(图片大小:300*226px) if (imgPro.ImageUrl.Substring(imgPro.ImageUrl.LastIndexOf("/") + 1)....
分类:Web程序   时间:2015-08-08 18:13:56    阅读次数:132
【LeetCode-面试算法经典-Java实现】【104-Maximum Depth of Binary Tree(二叉树的最大深度)】
【104-Maximum Depth of Binary Tree(二叉树的最大深度)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Given a binary tree, find its maximum depth.   The maximum depth is the number of nodes along the longest path from th...
分类:编程语言   时间:2015-08-08 07:59:24    阅读次数:126
[算法专题] 深度优先搜索&回溯剪枝
1. Palindrome Partitioning https://leetcode.com/problems/palindrome-partitioning/ Given a string s, partition s such that every substring of the parti...
分类:编程语言   时间:2015-08-07 23:31:16    阅读次数:183
velocity 使用笔记
1.velocity获取字符串长度方法: 用length()就可以了,截取子字符串用substring(0,10) 。$str.substring(0,3)2.volecity遍历map: #foreach($infos in $lineBusiness.entrySet()) ${i...
分类:其他好文   时间:2015-08-07 22:18:04    阅读次数:110
LPS UVA 11404 Palindromic Subsequence
题目传送门 1 /* 2 LPS(Longest Palidromic Subsequence):最长回文子序列,和回文串不同,子序列是可以不连续的。 3 转化为LCS问题,将字符串逆序,然后和本串求LCS就是LPS的长度(为啥不就是LPS?),但是前一半是LPS的一半,可以...
分类:其他好文   时间:2015-08-07 18:53:21    阅读次数:190
LeetCode(14)Longest Common Prefix
题目Write a function to find the longest common prefix string amongst an array of strings.分析该题目是求一个字符串容器中所有字符串的最长公共前缀。AC代码class Solution { public: string longestCommonPrefix(vector& strs) {...
分类:其他好文   时间:2015-08-06 17:02:30    阅读次数:168
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!