码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-06-28 23:59:00    阅读次数:383
[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 Common Prefix
题目 Write a function to find the longest common prefix string amongst an array of strings. 方法 从第一个字符开始,判断是否相同。 public String longestCommonPrefix(String[] strs) { if (strs ...
分类:其他好文   时间:2014-06-18 11:18:30    阅读次数:205
LeetCode: Longest Common Prefix 题解
Write a function to find the longest common prefix string amongst an array of strings.题解: 寻找一组字符串的最长公共前缀。最简单的方法,用一个字符串记录当前最长的公共前缀,然后依次比较。时间复杂度: O(N). ...
分类:其他好文   时间:2014-06-18 00:03:08    阅读次数:274
Leetcode: Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-06-17 14:35:50    阅读次数:297
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] 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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!