Show the first two partitions that would be created by quick sort on the following arrays. 9 18 51 39 15 45 14 5
What will be an ideal response?
Assuming that the leftmost element of the partition to be split is the pivot. The pivot value is shown in boldface
5 9 51 39 15 45 14 18
51 45 39 18 15 14 9 5
Computer Science & Information Technology
You might also like to view...
A contigous segment of an array is given by specifying two subscripts, lower and upper. Which of the following expressions gives the subscript of the array element that is three quarters of the way from lower to upper?
A) lower + 3 * upper /4 B) lower /3 + upper C) (upper — lower) * 3 /4 D) lower + (upper — lower) * 3 / 4
Computer Science & Information Technology
One of the most obvious initial changes in Windows Vista was the ____ interface.
A. Leopard B. Android C. Aero D. Symbian
Computer Science & Information Technology