public int maxProfit2(int[] prices) {
		if(prices == null || prices.length <= 1) return 0;
		int maxProfit = 0;
		int curMin = prices[0];
		for(int i = 0; i < prices.length; ++i){
			if(prices[i] - curMin > maxProfit){
				maxProfit = prices[i] - curMin;
			}
			if(prices[i] < curMin){
				curMin = prices[i];
			}
		}
		return maxProfit;
	}