Skip to content

Commit 3a38549

Browse files
committed
Stock problems: Reworded by adding today.
1 parent 870094a commit 3a38549

3 files changed

+6
-6
lines changed

problems/0121-best-time-to-buy-and-sell-stock.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class Solution:
4848
# states:
4949
# 0: hold stock
5050
# 1) keep holding
51-
# 2) just bought
51+
# 2) today just bought
5252
# 1: no stock
5353
# 1) keep no stock
54-
# 2) just sold
54+
# 2) today just sold
5555
dp = [-prices[0], 0]
5656

5757
for price in prices[1:]:

problems/0122-best-time-to-buy-and-sell-stock-ii.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class Solution:
5757
# states:
5858
# 0: hold stock
5959
# 1) keep holding
60-
# 2) just bought
60+
# 2) today just bought
6161
# 1: no stock
6262
# 1) keep no stock
63-
# 2) just sold
63+
# 2) today just sold
6464
dp = [-prices[0], 0]
6565

6666
for price in prices[1:]:

problems/0714-best-time-to-buy-and-sell-stock-with-transaction-fee.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ class Solution:
5454
# states:
5555
# 0: hold stock
5656
# 1) keep holding
57-
# 2) just bought
57+
# 2) today just bought
5858
# 1: no stock
5959
# 1) keep no stock
60-
# 2) just sold
60+
# 2) today just sold
6161
dp = [-prices[0], 0]
6262

6363
for price in prices[1:]:

0 commit comments

Comments
 (0)