Should it not be 8?
(5-3) + (3-0) + (4-1) = 8
This question states You may complete at most two transactions.
You may complete at most two transactions.
(5-3) + (4-0) = 6
because only can sell 2 times at most! not 3!
8 is the answer of “stock II”
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.