Skip to content

Commit 54fde55

Browse files
authored
Fix: inf -> float('inf')
1 parent 865f078 commit 54fde55

File tree

1 file changed

+1
-1
lines changed
  • solution/0100-0199/0121.Best Time to Buy and Sell Stock

1 file changed

+1
-1
lines changed

solution/0100-0199/0121.Best Time to Buy and Sell Stock/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ tags:
7474
```python
7575
class Solution:
7676
def maxProfit(self, prices: List[int]) -> int:
77-
ans, mi = 0, inf
77+
ans, mi = 0, float('inf')
7878
for v in prices:
7979
ans = max(ans, v - mi)
8080
mi = min(mi, v)

0 commit comments

Comments
 (0)