Dynamic ProgrammingSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most ...
分类:
其他好文 时间:
2014-11-21 18:21:20
阅读次数:
180
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-11-20 16:56:50
阅读次数:
236
题目描述:
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 complete as many transactions as you like ...
分类:
其他好文 时间:
2014-11-19 22:18:52
阅读次数:
225
题目描述:
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of ...
分类:
其他好文 时间:
2014-11-19 20:34:34
阅读次数:
103
依赖关系 Dependency
Class Car{}
Class Person{
int a;
static int b
public void buy(Car c){
int c;
....
}
}
一个类是另一个类的某个方法的参数,或局部变量,或静态方法调用等。
另外变量分两种:局部变量,成员变量。
在某个方法中定义的变量为局...
分类:
其他好文 时间:
2014-11-19 18:35:25
阅读次数:
120
Description
Good news for us: to release the financial pressure, the government started selling galaxies and we can buy them from now on! The first one who bought a galaxy was Tianming Yun and he g...
分类:
其他好文 时间:
2014-11-19 11:11:04
阅读次数:
134
Description
Good news for us: to release the financial pressure, the government started selling galaxies and we can buy them from now on! The first one who bought a galaxy was Tianming Yun and he g...
分类:
其他好文 时间:
2014-11-19 00:57:52
阅读次数:
166
DescriptionThere are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minimal requir...
分类:
其他好文 时间:
2014-11-16 20:04:22
阅读次数:
132
单例模式(Singleton)保证一个类只有一个实例,并提供一个访问它的全局访问点。关键在于要有1、一个私有的构造函数2、一个公有的析构函数 3、一个生成实例的接口4、线程安全Talk is cheap, show me the code.#include using namespace std;c...
分类:
其他好文 时间:
2014-11-13 01:52:26
阅读次数:
158
Description
The advice to "buy low" is half the formula to success in the bovine stock market.To be considered a great investor you must also follow this problems' advice:
"Bu...
分类:
其他好文 时间:
2014-11-12 19:50:43
阅读次数:
301