Tag Archives: max stock profit

Profit Maximization – Maximum Single-Sell Profit problem

Given an array of stock prices, where the increasing indexes of the array signify the increase in time. Return a good time to buy and sell such that profit is maximized. Suppose we are given an array of n integers representing stock prices on a single day. We want to find a pair (buyDay, sellDay), […]