9 ms·
The challenge is to make no more than two buy-sell transactions: "we must find the maximum profit that can be made assuming at most two no overlapping BUY – SEL
by JackC 6y ago
The challenge is to make no more than two buy-sell transactions: "we must find the maximum profit that can be made assuming at most two no overlapping BUY – SELL transactions."
- ajhurliman 6y agoThe limitation of 2 buy-sell transactions and no overlapping buy-sell transactions are orthogonal. My solution listed 3 buy-sell transactions, but none of them are overlapping. Edit: I see now that it says "two no[sic] overlapping" trade pairs, which invalidates my solution.