Question: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 c...
分类:
其他好文 时间:
2015-09-19 16:39:40
阅读次数:
142
Question: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 c...
分类:
其他好文 时间:
2015-09-19 15:14:27
阅读次数:
175
1. 概述RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j#include#include#include#include#include#includeusing namespace ...
分类:
编程语言 时间:
2015-09-19 10:46:47
阅读次数:
223
数据链路层协议有许多种,但是有三个基本问题则是共同的:封装成帧、透明传输和差错检测。(1)封装成帧所有在因特网上传送的数据都是以IP数据报为传送单位的,网络层的IP数据报传送到数据链路层就成为帧的数据部分,在帧的数据部分的前面和后面添加上首部和尾部,构成一个完整的帧。每一种链路层协议都规定了帧的数据部分的长度上线——最大传送单元MTU(Maximum Transfer Unit)。 (2)透明传输...
分类:
其他好文 时间:
2015-09-18 13:53:37
阅读次数:
223
O(nlgn) with repeated numbers.. Please note the extra repeat count array:class Solution {public: /** * @param nums: The integer array * @re...
分类:
其他好文 时间:
2015-09-18 07:04:44
阅读次数:
199
题目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.ExampleGiven the below binary tree: 1 / \2 3re...
分类:
其他好文 时间:
2015-09-17 13:14:16
阅读次数:
150
1.修改php的配置文件,找到php.ini文件 max_execution_time = 120 ;//设置成你想要的值,单位是秒2.使用ini_set()函数,使用这个函数来改变你的最大执行时间限制值 ini_set('max_execution_time', '100');则设置为100秒.....
分类:
Web程序 时间:
2015-09-17 11:29:16
阅读次数:
116
一。HashMap1.HashMap构造函数public HashMap(int initialCapacity, float loadFactor) { if (initialCapacity MAXIMUM_CAPACITY) initialCapacity = MAXIM...
分类:
编程语言 时间:
2015-09-15 17:55:21
阅读次数:
204
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-09-15 12:23:54
阅读次数:
165
需求:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest...
分类:
其他好文 时间:
2015-09-14 22:27:06
阅读次数:
156