码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果)
动态规划---最长上升子序列问题(O(nlogn),O(n^2))
LIS(Longest Increasing Subsequence)最长上升子序列 或者 最长不下降子序列。很基础的题目,有两种算法,复杂度分别为O(n*logn)和O(n^2) 。**********************************************************...
分类:其他好文   时间:2015-02-20 22:00:21    阅读次数:245
leetcode 104. 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...
分类:其他好文   时间:2015-02-17 19:54:58    阅读次数:146
leetcode_104_Maximum Depth of Binary Tree
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢 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...
分类:其他好文   时间:2015-02-17 10:25:14    阅读次数:168
Longest Consecutive Sequence
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43854597 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 consecutive elemen...
分类:其他好文   时间:2015-02-16 22:13:14    阅读次数:234
hdu3534 树形dp(求树中两点之间的最大距离)
http://acm.hdu.edu.cn/showproblem.php?pid=3534 Problem Description In the Data structure class of HEU, the teacher asks one problem: How to find the longest path of one tree and the number...
分类:其他好文   时间:2015-02-14 18:56:57    阅读次数:190
[leetcode]Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters 解题过程。
分类:其他好文   时间:2015-02-14 12:14:20    阅读次数:117
[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. 这道题是求一个二叉树的深度。题目中对深度的定义是:从根节点到叶节点依次经...
分类:其他好文   时间:2015-02-13 21:15:47    阅读次数:156
Longest Common Prefix
https://oj.leetcode.com/problems/longest-common-prefix/Write a function to find the longest common prefix string amongst an array of strings.解题思路:这题属于...
分类:其他好文   时间:2015-02-13 14:33:08    阅读次数:172
第五题:Longest Palindromic Substring
擦!leetcode题目:Longest Palindromic Substring...
分类:其他好文   时间:2015-02-12 00:50:18    阅读次数:161
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...
分类:其他好文   时间:2015-02-10 23:02:36    阅读次数:218
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!