public static int maxProfit(int[] prices) {
		if (prices.length == 0) {
			return 0;
		}
		if (prices.length == 1) {
			return 0;
		}
		int low = prices[0];
		int high = prices[0];
		int lowPos = 0;
		int highPos = 0;
		int max = 0;
		for (int i = 1; i < prices.length; i++) {
			if (prices[i] > high) {
				high = prices[i];
				if (high - low > max) {
					max = high - low;
				}
			}
			if (prices[i] < low) {
				low = prices[i];
				high = 0;
			}
		}
		if (max <= 0) {
			return 0;
		}
		return max;
	}