import java.util.*; public class Solution { /** * * @param prices int整型一维数组 * @return int整型 */ public int maxProfit (int[] prices) { int max=-1,i,tempMin=prices[0],var; for(i=1;i<prices.length;i++) { if((var=(prices[i]-tempMin))>0...