Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length ...
分类:
其他好文 时间:
2017-04-01 19:11:02
阅读次数:
152
four lines intersect in a map of size 6*6. the length of lines excluding intersections,You can see that the length of the longest line is 2. the thick ...
分类:
其他好文 时间:
2017-04-01 16:47:52
阅读次数:
214
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=1403 题目: Longest Common Substring Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/32768 ...
分类:
其他好文 时间:
2017-03-30 22:48:42
阅读次数:
326
题目: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. ...
分类:
其他好文 时间:
2017-03-24 10:32:02
阅读次数:
125
一.概述 回忆欧拉回路问题,要求找出一条经过图的每条边恰好一次的路径,这个问题是线性可解的。哈密尔顿圈问题是找一个简单圈,该圈包括图的每一个顶点。对于这个问题,现在还没有发现线性算法。 对于有向图的单源无权最短路径问题也是有线性时间可解的,但是对应的最长简单路径问题(longest-simple-p ...
分类:
其他好文 时间:
2017-03-14 13:39:01
阅读次数:
284
[SPOJ1812]Longest Common Substring II 试题描述 A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of l ...
分类:
其他好文 时间:
2017-03-13 19:13:34
阅读次数:
258
class Solution { public: /** * @param s input string * @return the longest palindromic substring */ string longestPalindrome(string &s) { // Write you... ...
分类:
其他好文 时间:
2017-03-11 23:52:17
阅读次数:
349
问题描述 Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the ...
分类:
其他好文 时间:
2017-03-11 21:33:39
阅读次数:
134
1.Factorialize a Number 计算一个整数的阶乘 2.Check for Palindromes 检查字符串是否是回文 3.Find the Longest Word in a String 找到句子中最长单词,并计算其长度 ...
分类:
其他好文 时间:
2017-03-10 13:22:02
阅读次数:
151
Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. ...
分类:
其他好文 时间:
2017-03-08 22:59:53
阅读次数:
671