All pastes #764751 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-07 15:12 UTC
rendered paste body
        #### OLD ####
	private int maxR2(int[] v, int y, int z){
		int x = z;
		if(y == v.length){
			return x;
		}
		else{
			if ( x < v[y]){
				x = v[y];
			}
			maxR2(v, y+1, x);
                        return x;
		}
	}


        #### NEW ####
	private int maxR2(int[] v, int y, int z){
		int x = z;
		if(y == v.length){
			return x;
		}
		else{
			if ( x < v[y]){
				x = v[y];
			}
			return maxR2(v, y+1, x);
		}
	}