码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果
[LeetCode] 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 ...
分类:其他好文   时间:2014-06-18 17:25:33    阅读次数:155
[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 le...
分类:其他好文   时间:2014-06-18 12:51:52    阅读次数:205
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 valid parentheses substring...
分类:其他好文   时间:2014-06-16 22:41:41    阅读次数:267
[leetcode]Longest Substring Without Repeating Characters @ Python
原题地址:https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/题意:Given a string, find the length of the longest substring witho...
分类:编程语言   时间:2014-06-15 19:51:00    阅读次数:254
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. 此题和求二叉树的最短路径几乎一模一样。 public int...
分类:其他好文   时间:2014-06-15 16:36:40    阅读次数:209
Leetcode: Longest Substring Without Repeating Characters
1 public class Solution { 2 public int lengthOfLongestSubstring(String s) { 3 int length = s.length(); 4 if (length == 0) return ...
分类:其他好文   时间:2014-06-13 08:31:32    阅读次数:214
[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 le...
分类:其他好文   时间:2014-06-12 18:32:00    阅读次数:222
[leetcode]Longest Common Prefix @ Python
原题地址:https://oj.leetcode.com/problems/longest-common-prefix/题意:Write a function to find the longest common prefix string amongst an array of strings.解...
分类:编程语言   时间:2014-06-10 16:31:52    阅读次数:261
leetcode -- 刷效率 Longest Common Prefix
题目描述: Write a function to find the longest common prefix string amongst an array of strings. 很简单的一道题目,但是我写了两个不一样的版本,运行时间确实数倍之差。。贴代码如下: 版本1: {CSDN:CODE:384511} 这个版本的运行时间为  44 ms...
分类:其他好文   时间:2014-06-10 08:18:58    阅读次数:291
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!