121. 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 transa ...
分类:
其他好文 时间:
2016-05-04 18:36:07
阅读次数:
144
struct
#if 0
#include
using namespace std;
main()
{
//定义结构类型
struct books
{
char title[20];
char author[15];
int pages;
float price;
} ;
//声明结构变量
...
分类:
编程语言 时间:
2016-05-03 18:44:59
阅读次数:
239
<?phpclass book{ public $name;//变量 public static $price;//静态变量 const id=1;//常量 function setname($name){//成员方法 $this->name=$name;//访问正常变量可以使用this关键字 } ...
分类:
Web程序 时间:
2016-05-01 20:25:13
阅读次数:
172
1、数据类型的进化 C#1中实现Product类型代码 1 public class Product 2 { 3 string name; 4 public string Name 5 { 6 get { return name; } 7 } 8 9 decimal price; 10 public ...
abstract class Goods{ private String name; private float price; private int count; public Goods(String name,float price,int count){ this.setName(name) ...
分类:
编程语言 时间:
2016-04-28 19:45:25
阅读次数:
221
Best Time to Buy and Sell Stock 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 ...
分类:
其他好文 时间:
2016-04-25 00:50:35
阅读次数:
132
Best Time to Buy and Sell Stock II 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 ...
分类:
其他好文 时间:
2016-04-25 00:29:14
阅读次数:
113
题目: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 transact ...
分类:
其他好文 时间:
2016-04-23 18:20:17
阅读次数:
157
abstract class Goods{ private String name; private float price; private int count; public Goods(String name,float price,int count){ this.setName(name) ...
分类:
其他好文 时间:
2016-04-22 16:04:08
阅读次数:
125
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 comple ...
分类:
其他好文 时间:
2016-04-20 21:41:37
阅读次数:
128