Buy and Sell Stocks 2
Say you have an array for which the i-th element is the price of a given stock on day i.
Say you have an array for which the i-th element is the price of a given stock on day i.
There are N children standing in a line. Each child is assigned a rating value.