What is the best case time complexity of binary insertion sort?
A. O(n)
B. O(n log n)
C. O(n2 )
D. O(log n)
Select an option to see the answer and solution.
Which of the following is not true about tree sort?
A. it is not an in place sorting algorithm
B. its every implementation is adaptive
C. it requires in order traversal of BST for sorting input elements
D. it is a stable sort
Select an option to see the answer and solution.
Sleep sort does not work for . . . . . . . .
A. negative numbers
B. large numbers
C. small numbers
D. positive numbers
Select an option to see the answer and solution.
How many flips does the simplest of pancake sorting techniques require?
A. 3n-3 flips
B. 2n-4 flips
C. 2n-3 flips
D. 3n-2 flips
Select an option to see the answer and solution.
Shell sort is applied on the elements 27 59 49 37 15 90 81 39 and the chosen decreasing sequence of increments is (5,3,1). The result after the first iteration will be
A. 27 59 49 37 15 90 81 39
B. 27 59 37 49 15 90 81 39
C. 27 59 39 37 15 90 81 49
D. 15 59 49 37 27 90 81 39
Select an option to see the answer and solution.
Pancake Sorting appears in which of the following?
A. Frequency Scaling
B. Storage Virtualization
C. Parallel Processing
D. Neural Networking
Select an option to see the answer and solution.
Which of the following is false?
A. Binary tree sort and quick sort have same running time
B. Binary tree sort used BST as work area
C. As the number of elements to sort gets larger, binary tree sort gets more and more efficient
D. Both quick sort and binary tree are in place sorting algorithms
Select an option to see the answer and solution.
What is the auxiliary space complexity of bottom up merge sort?
A. O(1)
B. O(n)
C. O(log n)
D. O(n log n)
Select an option to see the answer and solution.
How many comparisons will be made to sort the array arr={1, 5, 3, 8, 2} using bucket sort?
Select an option to see the answer and solution.
Which of the following algorithm is stable?
A. heap sort
B. cube sort
C. quick sort
D. bogosort
Select an option to see the answer and solution.
What will be the base case for the code of recursive insertion sort ?
Options are not available for this question.
Select an option to see the answer and solution.
Auxiliary space requirement of sleep sort is . . . . . . . .
A. O(n)
B. O(1)
C. O(max(input))
D. O(log n)
Select an option to see the answer and solution.
What is the best case complexity of QuickSort?
A. O(nlogn)
B. O(logn)
C. O(n)
D. O(n2 )
Select an option to see the answer and solution.
What is the best case time complexity of gnome sort?
A. O(n)
B. O(n2 )
C. O(n log n)
D. O(log n)
Select an option to see the answer and solution.
Which one of the following sorting algorithm is best suited to sort an array of 1 million elements?
A. Bubble sort
B. Insertion sort
C. Merge sort
D. Quick sort
Select an option to see the answer and solution.
Which of the following is an advantage of recursive bubble sort over its iterative version?
A. it has better time complexity
B. it has better space complexity
C. it is easy to implement
D. it has no significant advantage
Select an option to see the answer and solution.
It is not possible to implement counting sort when any of the input element has negative value.
Select an option to see the answer and solution.
Which of the following is the distribution sort?
A. Heap sort
B. Smooth sort
C. Quick sort
D. LSD radix sort
Select an option to see the answer and solution.
Which of the following sorting algorithm will be preferred when the size of partition is between 16 and 2 log(n) while implementing introsort?
A. quick sort
B. insertion sort
C. heap sort
D. merge sort
Select an option to see the answer and solution.
What is the worst case analysis of Shell sort using Sedgewick's increments?
A. O(N2 )
B. O(N3/2 )
C. O(N4/3 )
D. O(N5/4)
Select an option to see the answer and solution.