码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果)
LeetCode题目总结分类
注:此分类仅供大概参考,没有精雕细琢。有不同意见欢迎评论~利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problems/longest-valid-paren...
分类:其他好文   时间:2015-06-08 08:23:23    阅读次数:119
[LeetCode] Longest Substring Without Repeating Characters
Well, there many ways to solve this problem. Let's first look at a naive solution.The basic idea is simple. Starting from the first character of the s...
分类:其他好文   时间:2015-06-07 21:31:03    阅读次数:128
Project Euler:Problem 50 Consecutive prime sum
The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred. The longest s...
分类:其他好文   时间:2015-06-07 17:35:13    阅读次数:129
Project Euler:Problem 47 Distinct primes factors
The first two consecutive numbers to have two distinct prime factors are: 14 = 2 × 7 15 = 3 × 5 The first three consecutive numbers to have three distinct prime factors are: 644 = 2² × 7 × 23 ...
分类:其他好文   时间:2015-06-07 11:08:41    阅读次数:106
LeetCode3 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 for "abcabcbb" is "abc", which the length is...
分类:其他好文   时间:2015-06-06 14:57:54    阅读次数:120
LeetCode 14:Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.求最长公共前缀:以第一个字符串为模板比较之后的字符串即可。 1 public class Solution { 2 pu...
分类:其他好文   时间:2015-06-06 10:33:58    阅读次数:102
LeetCode 3:LongestSubString
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2015-06-06 10:25:13    阅读次数:115
[leetcode 5]longest palindromic substring
1 题目:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longe...
分类:其他好文   时间:2015-06-05 15:31:51    阅读次数:137
POJ1284---Primitive Roots(求原根个数, 欧拉函数)
Description We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (xi mod p) | 1 <= i <= p-1 } is equal to { 1, …, p-1 }. For example, the consecutive power...
分类:其他好文   时间:2015-06-04 22:54:39    阅读次数:231
LeetCode(14)--Longest Common Prefix
https://leetcode.com/problems/longest-common-prefix/原题:Write a function to find the longest common prefix string amongst an array of strings.思路:简单,直接遍...
分类:其他好文   时间:2015-06-03 19:02:16    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!