码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
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-09-13 20:08:35    阅读次数:179
Longest Consecutive Sequence
HashMap 在leetcode Longest Consecutive Sequence 上巧妙使用。...
分类:其他好文   时间:2014-09-13 15:57:45    阅读次数:144
Longest Common Prefix
[leetcode]Longest Common Prefix...
分类:其他好文   时间:2014-09-13 10:39:35    阅读次数:173
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-09-11 20:41:12    阅读次数:111
LeetCode Longest Palindromic Substring
class Solution {private: const char sep_char = '\1';public: string longestPalindrome(string s) { int max_len = 0; int len = s....
分类:其他好文   时间:2014-09-11 01:06:51    阅读次数:265
【算法导论学习-29】动态规划经典问题02:最长公共子序列问题(Longest common subsequence,LCS)
问题描述:序列X={x1,x2,…,xn},Y={y1,y2,…,yn},当Z={z1,z2…,zn}是X的严格递增下标顺序(可以不连续)的子集,也是Y的严格递增下标顺序(可以不连续)的子集,则Z是X和Y的公共子序列。例如X={A,B,C,B,D,A,B},Y={B,D,C,A,B,A},{B,C,A}、{B,C,B,A}、{B,D,A,B}都是X和Y的公共子序列。其中最长的公共子序列叫做Long...
分类:其他好文   时间:2014-09-10 15:53:20    阅读次数:317
Find longest contiguous sub array
It's still an Amazon interview question. Given an array containing only stars '*' and hashes '#' . Find longest contiguous sub array that will cont...
分类:其他好文   时间:2014-09-09 21:20:49    阅读次数:254
Leetcode 栈 Longest Valid Parentheses
Longest Valid Parentheses  Total Accepted: 14818 Total Submissions: 75749My Submissions Given a string containing just the characters '(' and ')', find the length of the longest valid (w...
分类:其他好文   时间:2014-09-09 13:18:18    阅读次数:166
Leetcode 细节实现 Longest Common Prefix
Longest Common Prefix  Total Accepted: 17298 Total Submissions: 63704My Submissions Write a function to find the longest common prefix string amongst an array of strings. 题意...
分类:其他好文   时间:2014-09-09 13:16:38    阅读次数:135
Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:其他好文   时间:2014-09-09 12:14:08    阅读次数:200
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!