摘要: 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), de... 阅读全文
posted @ 2015-12-26 11:17 dylqt 阅读(150) 评论(0) 推荐(0) 编辑
摘要: There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its n... 阅读全文
posted @ 2015-12-26 09:58 dylqt 阅读(221) 评论(0) 推荐(0) 编辑