Update 0714.买卖股票的最佳时机含手续费(动态规划).md
This commit is contained in:
parent
1c583ae1df
commit
69e54d9091
|
|
@ -155,7 +155,7 @@ Go:
|
|||
|
||||
Javascript:
|
||||
```javascript
|
||||
const maxProfit5 = (prices,fee) => {
|
||||
const maxProfit = (prices,fee) => {
|
||||
let dp = Array.from(Array(prices.length), () => Array(2).fill(0));
|
||||
dp[0][0] = 0 - prices[0];
|
||||
for (let i = 1; i < prices.length; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue