码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
leetcode之Maximum Depth of Binary Tree 以及Balanced 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-06-12 23:40:02    阅读次数:121
LeetCode之“动态规划”:Maximum Product Subarray
题目链接 题目要求: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the ar...
分类:其他好文   时间:2015-06-12 11:29:03    阅读次数:100
LeetCode 5: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...
分类:其他好文   时间:2015-06-12 00:33:10    阅读次数:122
LeetCode之“动态规划”:Maximum Subarray
题目链接 题目要求: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array[...
分类:其他好文   时间:2015-06-11 21:13:17    阅读次数:105
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 leaf node.求最大深度,用递归的方法/** * Definition for a binary...
分类:其他好文   时间:2015-06-11 19:26:53    阅读次数:126
[LintCode] Max Tree
Max TreeGiven an integer array with no duplicates. A max tree building on this array is defined as follow:The root is the maximum number in the arrayT...
分类:其他好文   时间:2015-06-11 18:58:01    阅读次数:228
最长回文子串-LeetCode 5 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 longes...
分类:其他好文   时间:2015-06-11 12:36:10    阅读次数:110
[LintCode] Maximum Subarray III
Maximum Subarray IIIGiven an array of integers and a numberk, find knon-overlappingsubarrays which have the largest sum.The number in each subarray sh...
分类:其他好文   时间:2015-06-10 19:19:20    阅读次数:170
RMQ 算法入门
1. 概述 RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j当然,该问题也可以用线段树(也叫区间树)解决,算法复杂度为:O(N)~O(logN),这里我们暂不介绍。 2.RMQ算法 对于该问题,最容易想到的解决方案是遍历,复杂度是O(n)。但当数据量非常大...
分类:编程语言   时间:2015-06-10 17:25:58    阅读次数:173
Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:其他好文   时间:2015-06-10 12:03:48    阅读次数:88
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!