Skip to content

Commit 9e67438

Browse files
committed
added New Function
1 parent 3aeb56c commit 9e67438

File tree

1 file changed

+1
-0
lines changed
  • Best Time to Buy and Sell Stock III

1 file changed

+1
-0
lines changed

Best Time to Buy and Sell Stock III/code.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var maxProfit = function (prices) {
1414
t2Cost = Math.min(t2Cost, prices[i] - t1Profit);
1515
t2Profit = Math.max(t2Profit, prices[i] - t2Cost);
1616
}
17+
return t2Profit;
1718

1819

1920
}

0 commit comments

Comments
 (0)