码迷,mamicode.com
首页 >  
搜索关键字:buy and sell stock    ( 1705个结果
[leetcode]Best Time to Buy and Sell Stock III
问题描述: 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 at most two transactions. Note: Y...
分类:其他好文   时间:2014-12-30 22:08:07    阅读次数:178
【leetcode】Best Time to Buy and Sell Stock II
Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ...
分类:其他好文   时间:2014-12-30 21:52:44    阅读次数:198
getElementsByClassName的兼容性
/*----------------------------index.html------------------------------------*/ Shopping list What to buy Don't forgrt to buy this stuff. A tin of b...
分类:其他好文   时间:2014-12-29 22:56:25    阅读次数:288
oracle中游标的使用
1)---使用带参数的游标;declareCURSORstock_cur(symbol_inVARCHAR2)ISSELECT*FROMrate_combine_nrnrWHEREnr.combine_no=symbol_in;stock_infostock_cur%ROWTYPE;beginOPENstock_cur(‘G600000001‘);--打开游标;loopFETCHstock_curINTOstock_info;--从游标中取值exitwhenstock_c..
分类:数据库   时间:2014-12-29 15:38:55    阅读次数:220
Best Time to Buy and Sell Stock(动态规划)
Say 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 one transaction (ie...
分类:其他好文   时间:2014-12-28 18:12:08    阅读次数:170
(中等) POJ 2828 Buy Tickets , 逆序+线段树。
Description: Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue… The Lunar New .....
分类:其他好文   时间:2014-12-28 00:25:48    阅读次数:147
LeetCode31: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 complete at most one transaction (ie, buy one and sell one share of the stock),...
分类:其他好文   时间:2014-12-26 16:41:15    阅读次数:136
[C++]LeetCode: 54 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 complete at most one transaction (ie, buy one and sell one share of the ...
分类:编程语言   时间:2014-12-25 16:25:25    阅读次数:146
poj 1952 BUY LOW, BUY LOWER 最长下降子序列计数
题意: 给n个数,求它的最长下降子序列长度和数量。 分析: dp,计数的时候要避免重复计数。 代码: //poj 1952 //sep9 #include using namespace std; const int maxN=5012; int a[maxN]; int dp[maxN]; int num[maxN]; int main() { int i,j,n,ans=0,an...
分类:其他好文   时间:2014-12-24 14:46:55    阅读次数:182
leetcode:Best Time to Buy and Sell Stock II
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-12-24 11:20:46    阅读次数:184
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!