Stock Buy Sell to Maximize Profit
Given a stock n-day price, you can only trade at most once a day, you can choose to buy a stock or sell a stock or give up the trade today, the task is to find the maximum profit can reach. Examples: Input : arr = [1,2,10,9] Output : 16 Explanation : You can buy in day 1,2… Read More »
