Change 'len' to 'length'

This commit is contained in:
YimvPi
2024-08-03 14:45:16 -04:00
parent 775f8c66b9
commit ba773d93be

View File

@ -308,7 +308,7 @@ class Solution:
class Solution:
def maxProfit(self, prices: List[int]) -> int:
length = len(prices)
if len == 0:
if length == 0:
return 0
dp = [[0] * 2 for _ in range(length)]
dp[0][0] = -prices[0]