阅读背景:

鉴于一系列时间和销售价格找到最佳的买卖时间,以最大化利润

来源:互联网 

Given [ (02:00, 7.5), (03:30, 7.9), (04:00, 8.0), (05:30, 6.8), (10:00, 9.01)] times and selling price we need to find the best time for buying and selling to maximize the profit. // times are in increasing order // Sample Output: Buy at 05:30 and sell at 10:00 for a profit of 2.21Given [ (02:00, 7.5), (03:30, 7.9), (04:00, 8.0




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: