Fill in the code to complete the following method for sorting a list.

```
public static void sort(double[] list) {
___________________________;
}

public static void sort(double[] list, int high) {
if (high > 1) {
// Find the largest number and its index
int indexOfMax = 0;
double max = list[0];
for (int i = 1; i <= high; i++) {
if (list[i] > max) {
max = list[i];
indexOfMax = i;
}
}
// Swap the largest with the last number in the list
list[indexOfMax] = list[high];
list[high] = max;

// Sort the remaining list
sort(list, high - 1);
}
}
```
a. sort(list)
b. sort(list, list.length)
c. sort(list, list.length - 1)
d. sort(list, list.length - 2)


c. sort(list, list.length - 1)

Computer Science & Information Technology

You might also like to view...

What kind of output is desirable if many readers will be reading, storing, and reviewing output over a period of years?

What will be an ideal response?

Computer Science & Information Technology

The audience should be considered when applying animation to a presentation

Indicate whether the statement is true or false

Computer Science & Information Technology

A(n) ________ function occurs when one function is embedded as an argument within another function

Fill in the blank(s) with correct word

Computer Science & Information Technology

In the ________ you can choose between a Scenario summary, which displays the data in a table, or a Scenario PivotTable report

A) Scenario Manager B) Evaluate Formula dialog box C) Scenario Summary dialog box D) Solver

Computer Science & Information Technology