码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
Project Euler:Problem 67 Maximum path sum II
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find th...
分类:其他好文   时间:2015-07-16 09:52:17    阅读次数:155
Project Euler18题 从上往下邻接和
题目:By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find...
分类:其他好文   时间:2015-07-16 09:47:47    阅读次数:157
124 Binary Tree Maximum Path Sum
题目:124 Binary Tree Maximum Path Sum这道题就是分别算出左子树和右子树的可能最大和,然后对Path的值进行更新即可class Solution: def __init__(self): self.ans = -100000 def maxPa...
分类:其他好文   时间:2015-07-15 14:40:29    阅读次数:96
IP分片浅析
在TCP/IP分层中,数据链路层用MTU(Maximum Transmission Unit,最大传输单元)来限制所能传输的数据包大小,MTU是指一次传送的数据最大长度,不包括数据链路层数据帧的帧头,如以太网的MTU为1500字节,实际上数据帧的最大长度为1512字节,其中以太网数据帧的帧头为12字...
分类:其他好文   时间:2015-07-15 12:30:43    阅读次数:115
[LeetCode] Maximum Depth of Binary Tree
Question: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 fa...
分类:其他好文   时间:2015-07-14 17:15:29    阅读次数:106
[LeetCode][Java] Jump Game II
题目: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Yo...
分类:编程语言   时间:2015-07-14 11:26:06    阅读次数:140
5.Longest Palindromic Substring (String; DP)
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...
分类:其他好文   时间:2015-07-14 09:48:50    阅读次数:130
Leetcode 53 Maximum SubArray
---恢复内容开始---方法1:brute force 时间复杂度 O(n^2) 空间复杂度 O(1)public class Solution { public int maxSubArray(int[] nums) { if (nums == null || nums.length ...
分类:其他好文   时间:2015-07-14 07:31:45    阅读次数:94
Maximum Product Subarray
题目:Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],...
分类:其他好文   时间:2015-07-13 22:22:20    阅读次数:95
*Best Time to Buy and Sell Stock III
题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complet...
分类:其他好文   时间:2015-07-13 22:12:40    阅读次数:102
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!