Each merge step of the mergesort requires ______ major operations.

a. 3 * n – 1
b. 4 * n – 1
c. (n – 1)/2
d. n – 1


a. 3 * n – 1

Computer Science & Information Technology

You might also like to view...

A(n) ________ defines the boundaries of the system.

A) context-level data flow diagram B) entity-relationship model C) open diagram D) closed diagram

Computer Science & Information Technology

Special method ________ customizes the behavior of built-in function abs.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

(Enhanced Bubble Sort) Make the following simple modifications to improve the perfor- mance of the bubble sort you developed in Exercise 19.5:

a) After the first pass, the largest value is guaranteed to be in the highest-numbered element of the vector; after the second pass, the two highest values are “in place”; and soon. Instead of making nine comparisons (for a 10-element vector) on every pass, modify the bubble sort to make only the eight necessary comparisons on the second pass, seven on the third pass, and so on. b) The data in the vector may already be in the proper order or near-proper order, so why make nine passes (of a 10-element vector) if fewer will suffice? Modify the sort to check at the end of each pass whether any swaps have been made. If none have been made, the data must already be in the proper order, so the program should terminate. If swaps have been made, at least one more pass is needed.

Computer Science & Information Technology

The Alexamara Marina Group database uses two uppercase letters to represent an owner number.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology