public static int partMax(int[] prices, int start, int end){
    	if(end == start) return 0;
    	int min = prices[start], max = 0;
    	for(int i = start + 1; i <= end; i++){
    		if(prices[i] - min > max) max = prices[i] - min;
    		if(prices[i] < min) min = prices[i];
    	}
    	return max;
    }