(A) Large
(B) Medium
(C) Small
(D) Not Known
Tag: Fundamentals of Algorithms
The running time of quick sort depends heavily on the selection of?
(A) No of inputs
(B) Arrangement of elements in array
(C) Size o elements
(D) Pivot element
After partitioning array in Quick sort, pivot is placed in a position such that?
(A) Values smaller than pivot are on left and larger than pivot are on right
(B) Values larger than pivot are on left and smaller than pivot are on right
(C) Pivot is the first element of array
(D) Pivot is the last element of array
– What is the total time to heapify?
(A) O(log n)
(B) O(n log n)
(C) O(n^2 log n)
(D) O(log^2n)
Slow sorting algorithms run in?
(A) O(n^2)
(B) O(n)
(C) O( log n)
(D) O(n log n)
One of the clever aspects of heaps is that they can be stored in arrays without using any __.
(A) pointers
(B) constants
(C) variables
(D) functions
In which order we can sort?
(A) increasing order only
(B) decreasing order only
(C) increasing order or decreasing order
(D) both at the same time
In the analysis of Selection algorithm, we make a number of passes, in fact it could be as many as?
(A) T(n)
(B) T(n / 2)
(C) log n
(D) n / 2 + n / 4