121. Best Time to Buy and Sell Stock

動態規劃 就是至關於每次找到最小的那個而後進行更新,接着看那個profit會不會變化it int maxProfit(int* prices, int pricesSize) 動態規劃 {     int i,profit=0,min=prices[0],temp;     if(pricesSize==0)         return 0;          for(i=1;i<pricesS
相關文章
相關標籤/搜索