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...
分类:
其他好文 时间:
2015-01-15 12:34:54
阅读次数:
111
PresidentofIranMahmoud·AhmadiNejadtoldAmericamedia,chaussureslouboutinpascher,IranwillreleasetwojailedforespionageUSAmaleyouth.
AhmadiNejadtoldUSANBCreporter,cheapnfljerseys,twoAmericanswillbereleased"intwodays".TheNationalBroadcastingCompanyisscheduledfor..
分类:
Web程序 时间:
2015-01-15 11:09:37
阅读次数:
153
Preface:前段时间boss突发奇想,想要检测iPhone6供货,吓我,这是干啥呢。同仁提到肯定是想抢iPhone6,打开官网:http://store.apple.com/cn/buy-iphone/iphone6,在当时的时候显示缺货,原来是想要检测官网iPhone6的页面变化,等到缺货变为有现货的时候立马下单抢,跟抢火车票似的,隔一段时间访问一次,检测页面是否发生了变化,发生了变化手机短...
分类:
编程语言 时间:
2015-01-15 10:59:03
阅读次数:
191
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 the stock),...
分类:
其他好文 时间:
2015-01-15 09:30:17
阅读次数:
172
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 (ie, buy on...
分类:
其他好文 时间:
2015-01-15 09:27:56
阅读次数:
187
需求:股民买卖股票初步代码:# -*- encoding: utf-8 -*-#股票1class Stock1 def buy puts '股票1买入' end def sell puts '股票1卖出' endend#股票2class S...
分类:
其他好文 时间:
2015-01-14 22:43:20
阅读次数:
177
只有每次看这个图的时候才觉得c++没有白学啊~~~平常用vs的时候都各种怀念eclipse,各种怀念java~~~ 这题算的是最大利润,原先我想的是找到最小值和最大值,之差不就是最大利润了么,后来想想,最小值可能在最大值之后,不能说在3号买进了回去1号卖出股票哈~然后想,记录某天之前的最小值,再记录...
分类:
其他好文 时间:
2015-01-14 19:39:12
阅读次数:
151
这大家可以这么想
一共有50瓶,
喝完三瓶 + 1
喝完三瓶 + 1
那么 50 - 3 + 1 -3 + 1
以此类推知道。。。最后剩余的可乐数小于3退出。那么依旧题意可以写出。
package cccc;
public class Buy {
public static void main(String[] args) {
int number = 50; /...
分类:
其他好文 时间:
2015-01-13 19:50:47
阅读次数:
795
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/Say you have an array for which theithelement is the price of a given stock on day...
分类:
其他好文 时间:
2015-01-13 14:14:12
阅读次数:
100
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/Say you have an array for which theithelement is the price of a given stock on dayi.I...
分类:
其他好文 时间:
2015-01-13 14:08:51
阅读次数:
132