码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
LeetCode 3 Longest Substring Without Repeating Characters
Problem: 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 lengt...
分类:其他好文   时间:2015-05-05 21:56:58    阅读次数:134
Oj练习42——T3 Longest Substring Without Repeating Characters
求一个字符串中不含重复字母的最大子串的长度。【思路】1.用临时tmp记录长度,遇到重复字母把tmp当前值赋给要返回的length,tmp归零比较tmp和length,当tmp>length时,更新length。2.每个字母向前遍历是否有重复字母,用哈希表。3.反复提交代码不能通过后看了题目tag,知...
分类:其他好文   时间:2015-05-05 19:15:55    阅读次数:156
BITCOIN
目录1.block chain1.Block ChainBlocks in the main chain (black) are the longest series of blocks that go from the genesis block (green) to the current bl...
分类:其他好文   时间:2015-05-05 16:09:27    阅读次数:117
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 1 public cla...
分类:其他好文   时间:2015-05-04 23:58:12    阅读次数:271
Java [leetcode 14] Longest Common Prefix
小二好久没有更新博客了,真是罪过,最近在看linux的东西导致进度耽搁了,所以今晚睡觉前怒刷一题!问题描述:Write a function to find the longest common prefix string amongst an array of strings.解题思路:该问题就是...
分类:编程语言   时间:2015-05-04 01:12:56    阅读次数:534
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
最长回文串: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
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!