What is the complexity of the quick sort algorithm in the average case scenario?

a. O(n log(n))
b. O(n^2)
c. O(n)
d. O(log(n))


a. O(n log(n))
Mathematical analysis of quick sort shows that, on average, the algorithm takes O(n log n) comparisons to sort n items.

Computer Science & Information Technology

You might also like to view...

A class inherited from two or more levels up in the hierarchy is known as a .

a) indirect base class b) direct base class c) superclass d) None of the above

Computer Science & Information Technology

Which of the following is not a primitive type?

a. char b. float c. String d. int

Computer Science & Information Technology

State which of the following statements are true and which are false. If a statement is false, explain why.

1) strings are always null terminated. 2) Class string member function max_size returns the maximum size for a string. 3) Class string member function at can throw an out_of_range exception. 4) Class string member function begin returns an iterator.

Computer Science & Information Technology

In a truth table, the expression ____ is true.

A. true AND true B. true AND false C. false AND true D. false AND false

Computer Science & Information Technology