[Solved]QuickSort highest lowest Situation

The problem was bad syntax

Code:

` case('2'):`

{

for (int index = 0; index <count; index++)

list[index] = (int) (Math.random() * 100000);

low=getLowest(list);

high=getHighest(list);

for(int index=0; index<count; index++)

System.out.print(list[index]+ " ");

low=getLowest(list);

System.out.println(low);

}

Ok, I've been putting alot of these up lately, but here's the situation.

We have to quicksort with median and middle. So, this is the case where it will eventually use the median value as the pivot. This is the general problem, It will pick up the highest or the lowest value, currently its only picking up the highest, insted of both. Before that it was picking up the lowest only.

Though the methods are both seperate, and use local veriables thtat are set to what they need to be independent of eachother. So before I can figure my way through the quick sort itself, I was wondering fi someone could see something wronge with the code that I've missed.

Code:

` public static int getLowest(int x[])`

{

int min;

min = x[0];

for (int j = 0; j < x.length; j++)

{

if (min > x[j])

min = x[j];

}

return min;

}

public static int getHighest(int x[])

{

int i;

int max;

max = x[0];

for (i = 0; i < x.length; i++)

{

if (max < x[i])

max = x[i];

}

return max;

}

These are the two methods, if you see something please tell me. I'm ripping out hair here.