What will be the base case in the function of binary search used in the code of binary insertion sort? (high and low are the rightmost and leftmost index of array respectively and item is the element whose correct position is to be determined by the binary search function)
Options are not available for this question.
Select an option to see the answer and solution.
What is an external sorting algorithm?
A. Algorithm that uses tape or disk during the sort
B. Algorithm that uses main memory during the sort
C. Algorithm that involves swapping
D. Algorithm that are considered 'in place'
Select an option to see the answer and solution.
What is the advantage of comb sort over merge sort?
A. Comb sort is an in place sorting algorithm
B. Comb sort is a stable sorting algorithm
C. Comb sort is more efficient
D. It has no advantage
Select an option to see the answer and solution.
Heap sort is an extremely stable algorithm.
Select an option to see the answer and solution.
Statement 1: Shell sort is a stable sorting algorithm.
Statement 2: Shell sort is an in-place sorting algorithm.
A. Both statements are true
B. Statement 2 is true but statement 1 is false
C. Statement 2 is false but statement 1 is true
D. Both statements are false
Select an option to see the answer and solution.
Choose the correct statement regarding binary insertion sort?
A. It has a better time complexity as compared to the standard version
B. It has a better space complexity as compared to the standard version
C. it takes less number of comparisons in the best case as compared to the standard version
D. it takes less number of comparisons in the worst case as compared to the standard version
Select an option to see the answer and solution.
Bucket sort is most efficient in the case when . . . . . . . .
A. the input is non uniformly distributed
B. the input is uniformly distributed
C. the input is randomly distributed
D. the input range is large
Select an option to see the answer and solution.
What is the worst case time complexity of recursive bubble 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.
For the following question, how will the array elements look like after second pass?
34, 8, 64, 51, 32, 21
A. 8, 21, 32, 34, 51, 64
B. 8, 32, 34, 51, 64, 21
C. 8, 34, 51, 64, 32, 21
D. 8, 34, 64, 51, 32, 21
Select an option to see the answer and solution.
Which of the following should be used to sort a huge database on a fixed-length key field?
A. Insertion sort
B. Merge sort
C. LSD radix sort
D. Quick sort
Select an option to see the answer and solution.
Pigeonhole sort is an in place sorting algorithm.
Select an option to see the answer and solution.
Which of the following pair of sorting algorithms are stable?
A. gnome sort and merge sort
B. heap sort and merge sort
C. gnome sort and quick sort
D. merge sort and selection sort
Select an option to see the answer and solution.
Auxiliary space requirement of odd-even sort is . . . . . . . .
A. O(n)
B. O(log n)
C. O(1)
D. O(n2 )
Select an option to see the answer and solution.
Which of the following is an example of an unstable sorting algorithm?
A. cycle sort
B. insertion sort
C. bubble sort
D. merge sort
Select an option to see the answer and solution.
Bead sort is a comparison based sorting algorithm.
Select an option to see the answer and solution.
Which of the following sorting algorithm is not in place?
A. library sort
B. quick sort sort
C. heap sort
D. gnome sort
Select an option to see the answer and solution.
What is the average case time complexity of permutation sort?
A. O(n2 )
B. O(n*n!)
C. O(infinity)
D. O(n log n)
Select an option to see the answer and solution.
Library sort is a comparison based sort.
Select an option to see the answer and solution.
Which of the following header file is a must to implement sleep sort algorithm?
A. string.h
B. math.hw
C. bios.h
D. windows.h
Select an option to see the answer and solution.
Which of the following sorting algorithm uses a binary search?
A. radix sort
B. binary insertion sort
C. odd-even sort
D. bead sort
Select an option to see the answer and solution.