Q:

How to sort an array given a range?

First of all I am using java and my first objective is to use bubble sort to sort an array in descending order given the range lowindex..highindex (inclusive). So my question is how to sort an array given a range? An example would be greatly appreciated to get me started on doing this. 

A:

That wheel has already been invented:
Arrays.sort(array, lowIndex, highIndex + 1);

See doc.

