What is the average running time for quicksort?
|
O(1) |
||
|
O(log10N) |
||
|
O(log2N) |
||
|
O(log2N) |
||
|
O(N) |
||
|
O(N log N) |
||
|
O(N2) |
||
|
O(N3) |
||
|
O(Nk) |
||
|
O(2N) |
||
|
O(N!) |
Let's take an Array to contain N elements:
The Average Running time of Quick Sort is O(N logN).

From the above figure, the average running time-based
levels splitted = 
Quick Sort uses the recursive approach.
If you need any help regarding the answer do let me know.
What is the average running time for quicksort? O(1) O(log10N) O(log2N) O(log2N) O(N) O(N log N)...
What is the worst case running time of a linear search? O(1) O(log10N) O(log2N) O(log2N) O(N) O(N log N) O(N2) O(N3) O(Nk) O(2N) O(N!)
What is the worst case running time of a binary search? O(1) O(log10N) O(log2N) O(log2N) O(N) O(N log N) O(N2) O(N3) O(Nk) O(2N) O(N!)
JAVA What is the running time required for repeatedly splitting a problem into two equally sized halves, assuming no additional work needs to be done? O(1) O(log10N) O(log2N) O(log2N) O(N) O(N log N) O(N2) O(N3) O(Nk) O(2N) O(N!)
a) Prove that running time T(n)=n3+30n+1 is O(n3) [1 mark] b) Prove that running time T(n)=(n+30)(n+5) is O(n2) [1 mark] c) Count the number of primitive operation of algorithm unique1 on page 174 of textbook, give a big-Oh of this algorithm and prove it. [2 mark] d) Order the following function by asymptotic growth rate [2 mark] a. 4nlogn+2n b. 210 c. 3n+100logn d. n2+10n e. n3 f. nlogn
(a) Rank the following three functions: log N, log (N2), log2N. Explain.
Give an algorithm with the following properties. • Worst case running time of O(n 2 log(n)). • Average running time of Θ(n). • Best case running time of Ω(1).
Given an specific example of a list of n integers where the running time of Quicksort on them is in Ω(n2). (Assume the pivot is always chosen at the front of a list.)
O(log(log(N))) < O(log(N)) a. True b. False O(N ) < O(log(N)) a. True b. False O( N5) < O(N2 - 3N + 2) a. True b. False O(2N) < O(N2) a. True b. False
Order the following functions by asymptotic growth rate. 2n log n + 2n, 210, 2 log n, 3n + 100 log n, 4n, 2n, n2 + 10n, n3, n log n2
When sorting n records, Merge Sort has worst-case running time O(log n) O O(n log n) O O(n) O(n^2)