Best_Time_to_Buy_and_Sell_Stock Time Limit Exceeded

n^2 cannot pass
Best_Time_to_Buy_and_Sell_Stock  still timeout
Best Time to Buy and Sell Stock learned

....