Greedy, Greedy, Greedy.. It is all about maximum interval update.One trick is, we start looping over each element from the one nearest to end to farth...
分类:
其他好文 时间:
2014-08-01 13:32:21
阅读次数:
283
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-08-01 04:47:25
阅读次数:
243
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:
其他好文 时间:
2014-07-31 23:19:10
阅读次数:
259
1.The use of state-observation transition functions rather than the separate transition and observation functions in HMMs allows us to model transitio...
分类:
其他好文 时间:
2014-07-31 20:43:27
阅读次数:
179
题目: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 farthes....
分类:
编程语言 时间:
2014-07-31 02:41:15
阅读次数:
229
Problem Description
Given an N * M matrix with each entry equal to 0 or 1. We can find some rectangles in the matrix whose entries are all 1, and we define the maximum area of such rectangle as thi...
分类:
移动开发 时间:
2014-07-30 20:48:34
阅读次数:
260
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