If a max heap is implemented using a partially filled array called data, and the array contains n elements (n >
0), where is the entry with the greatest value?
Here is a small function definition:
void f(int i, int &k)
{
i = 1;
k = 2;
}
Suppose that a main program has two integer variables x and y, which are given the value 0. Then the main
program calls f(x,y); What are the values of x and y after the function f finishes?
Suppose that a selection sort of 100 items has completed 42 iterations of the main loop. How many items are
now guaranteed to be in their final spot (never to be moved again)?
Here is an array of ten integers:
5 3 8 9 1 7 0 2 6 4
The array after the FIRST iteration of the large loop in a selection sort (sorting from smallest to largest).