Which of the following sorting algorithm is not in place?
A. quick sort
B. bead sort
C. cycle sort
D. heap sort
Select an option to see the answer and solution.
Which of the following sorting algorithm is in place?
A. recursive bubble sort
B. merge sort
C. radix sort
D. counting sort
Select an option to see the answer and solution.
MSD radix sort should be preferred over LSD radix sort when we have to maintain the original relative order.
Select an option to see the answer and solution.
Which of the following function chooses a random index as pivot.
Options are not available for this question.
Select an option to see the answer and solution.
Which of the following sorting algorithm is a constituent of tim sort?
A. selection sort
B. quick sort
C. merge sort
D. heap sort
Select an option to see the answer and solution.
Randomized quick sort is a stable sort.
Select an option to see the answer and solution.
Introsort sort is a comparison based sort.
Select an option to see the answer and solution.
Which of the following methods is the most effective for picking the pivot element?
A. first element
B. last element
C. median-of-three partitioning
D. random element
Select an option to see the answer and solution.
What is the average number of comparisons used to heap sort a random permutation of N distinct items?
A. 2N log N-O(N)
B. 2N log N-O(N log N)
C. 2N log N-O(N log log N)
D. 2N log N-O(log N)
Select an option to see the answer and solution.
Which of the following sorting algorithm is NOT stable?
A. Quick sort
B. Cocktail sort
C. Bubble sort
D. Merge sort
Select an option to see the answer and solution.
Which of the following is not a variant of merge sort?
A. in-place merge sort
B. bottom up merge sort
C. top down merge sort
D. linear merge sort
Select an option to see the answer and solution.
Consider an array of length 5, arr[5] = {9, 7, 4, 2, 1}. What are the steps of insertions done while running insertion sort on the array?
A. 7 9 4 2 1 4 7 9 2 1 2 4 7 9 1 1 2 4 7 9
B. 9 7 4 1 2 9 7 1 2 4 9 1 2 4 7 1 2 4 7 9
C. 7 4 2 1 9 4 2 1 9 7 2 1 9 7 4 1 9 7 4 2
D. 7 9 4 2 1 2 4 7 9 1 4 7 9 2 1 1 2 4 7 9
Select an option to see the answer and solution.
When we realize a specific implementation of a pancake algorithm, every move when we find the greatest of the sized array and flipping can be modeled through . . . . . . . .
A. Combinations
B. Exponential functions
C. Logarithmic functions
D. Permutations
Select an option to see the answer and solution.
How many passes does an insertion sort algorithm consist of?
Select an option to see the answer and solution.
A machine needs a minimum of 200 sec to sort 1000 elements by Quick sort. The minimum time needed to sort 200 elements will be approximately . . . . . . . .
A. 60.2 sec
B. 45.54 sec
C. 31.11 sec
D. 20 sec
Select an option to see the answer and solution.
The descending heap property is . . . . . . . .
A. A[Parent(i)] = A[i]
B. A[Parent(i)] <= A[i]
C. A[Parent(i)] >= A[i]
D. A[Parent(i)] > 2 * A[i]
Select an option to see the answer and solution.
What is the usual size of a run in tim sort?
A. 32
B. less than 32
C. 32-64 depending on size of the array
D. 64
Select an option to see the answer and solution.
What is the full form of MSD in MSD radix sort?
A. most significant digit
B. many significant digit
C. more significant digit
D. must significant digit
Select an option to see the answer and solution.
Sleep sort should be preferred over permutation sort as it has better time complexity.
Select an option to see the answer and solution.
Introsort algorithm is combination of . . . . . . . .
A. Quick sort and Heap sort
B. Quick sort and Shell sort
C. Heap sort and Merge sort
D. Heap sort and insertion sort
Select an option to see the answer and solution.