Algorithm Used: Created a Vehicle class with make, model, and MPG attributes. Overrode the default toString() method to customize display output for the vehicles. Implemented a comparator class to ...
int LastElementIndex = arr.length-i-1; //index of last Element after each step int MaxIndex = MaxIndex(arr,0,LastElementIndex); // index of maximum value, in the remaining unsorted array ...