Skip to content

Commit 55b3f26

Browse files
authored
Update best_time_to_buy_and_sell_stock.py
1 parent d7eca5a commit 55b3f26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

best_time_to_buy_and_sell_stock.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
"""
@@ -13,4 +13,6 @@ def maxProfit(self, prices):
1313
for i in xrange(1, len(prices)):
1414
ret = max(ret, prices[i] - buy_price)
1515
buy_price = min(prices[i], buy_price) # 更新买入价格
16-
return ret
16+
return ret
17+
18+
# medium: http://lintcode.com/zh-cn/problem/best-time-to-buy-and-sell-stock/

0 commit comments

Comments
 (0)