We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3aeb56c commit 9e67438Copy full SHA for 9e67438
Best Time to Buy and Sell Stock III/code.js
@@ -14,6 +14,7 @@ var maxProfit = function (prices) {
14
t2Cost = Math.min(t2Cost, prices[i] - t1Profit);
15
t2Profit = Math.max(t2Profit, prices[i] - t2Cost);
16
}
17
+ return t2Profit;
18
19
20
0 commit comments