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 ...
分类:
其他好文 时间:
2014-07-30 20:33:34
阅读次数:
193
Windows操作系统使用Maximum Transmission Unit (MTU) 来确定在下面的网络层上可以传输的协议数据包(protocol data packet)的最大尺寸. MTU参数通常出现在与某一个接口(网卡, 串口等)的通信中, 并且每个接口都是分开设置的. 为了达到最优的网络...
题意:给你一个序列,找两个长度为 k 且没有重合区间的数使得其和最大解题思路:1)线段树想了半天想不出只能先用线段树撸了一发,这题dp 第一名只要了 9分钟。就是把起点为 i 长度为 k 的和预处理出来,再用线段树枚举去找。解题代码: 1 // File Name: 332b.cpp 2 // .....
分类:
其他好文 时间:
2014-07-30 11:46:03
阅读次数:
373
题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com....
分类:
编程语言 时间:
2014-07-30 05:35:13
阅读次数:
260
题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com....
分类:
编程语言 时间:
2014-07-30 05:35:03
阅读次数:
309
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [?2,1,?3,4,?1...
分类:
编程语言 时间:
2014-07-30 05:34:43
阅读次数:
319
CiscoCatalyst2960,3750G交换机12.2版本的ios默认关闭ipdevicetracking.但是CiscoCatalyst2960s和3750x交换机升级到15.2的版本后,默认已开启ipdevicetracking,而且全局模式下无法关闭它,如果不关闭的话,在级联的trunk端口上我们showmacadd,可以看到这样的情形,对端交换..
分类:
其他好文 时间:
2014-07-28 00:40:20
阅读次数:
189
LeetCode: Max Points on a LineGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.地址:https://oj.leetcod...
分类:
其他好文 时间:
2014-07-27 23:22:59
阅读次数:
289
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 complete a...
分类:
其他好文 时间:
2014-07-27 09:49:52
阅读次数:
237
很久之前就想攻克一下网络流的问题了,一直拖着,一是觉得这部分的内容好像非常高级,二是还有很多其他算法也需要学习,三是觉得先补补相关算法会好点
不过其实这虽然是图论比较高级的内容,但是基础打好了,那么还是不会太难的,而且它的相关算法并不多,熟悉图论之后就可以学习了,就算法不会二分图也可以学习。
这里使用Ford-Fulkerson算法,其实现的方法叫做:Edmonds-Karp
Algori...
分类:
其他好文 时间:
2014-07-26 17:22:32
阅读次数:
413