码迷,mamicode.com
首页 >  
搜索关键字:and sell stock i ii    ( 7493个结果
[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-07-07 08:19:36    阅读次数:151
leetcode 题解:Search in Rotated Sorted Array II (旋转已排序数组查找2)
题目:Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function...
分类:其他好文   时间:2014-07-07 00:14:37    阅读次数:186
[LeetCode] Best Time to Buy and Sell Stock III
将Best Time to Buy and Sell Stock的如下思路用到此题目思路1:第i天买入,能赚到的最大利润是多少呢?就是i + 1 ~ n天中最大的股价减去第i天的。思路2:第i天买出,能赚到的最大利润是多少呢?就是第i天的价格减去0~ i-1天中最小的。和前两道题比起来的话,这道题最...
分类:其他好文   时间:2014-07-06 23:40:44    阅读次数:284
【题解】【数组】【DP】【Codility】Best Time to Buy and Sell Stock
Given a log of stock prices compute the maximum possible earning.
分类:其他好文   时间:2014-07-06 20:04:21    阅读次数:259
HDU:A + B Problem II
A + B Problem II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 204863    Accepted Submission(s): 39378 Problem Description I have...
分类:其他好文   时间:2014-07-06 09:38:22    阅读次数:182
nios ii boot过程
目录1概述.......................................................................12几种常见的boot方式.........................................................12.1...
分类:移动开发   时间:2014-07-05 19:51:09    阅读次数:422
Google's Hybrid Approach to Research
文档地址:戳我总结: (i) aims to generate scientific and engineering advances in fields of import to Google, (目标) (ii) does so in a way that tends to factorize....
分类:移动开发   时间:2014-07-05 17:37:34    阅读次数:391
【LeetCode】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-07-03 17:51:01    阅读次数:235
HDU 2639 Bone Collector II
Bone Collector II Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2089    Accepted Submission(s): 1097 Problem Description The titl...
分类:其他好文   时间:2014-07-03 13:27:46    阅读次数:147
leetcode 题解:Remove Duplicates from Sorted Array II(已排序数组去三次及以上重复元素)
题目:Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ...
分类:其他好文   时间:2014-07-03 12:10:12    阅读次数:191
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!