New answers tagged


Now I have another favorite example called "Buy Low, Sell High", all the credit go to this article Given a stock’s price history as a sequence, and assuming that you are only allowed to make one purchase and one sale, what is the maximum profit that can be obtained? For example, ...

Top 50 recent answers are included