Top 80+ Solved Searching, Sorting and Hashing Techniques MCQ Questions Answer
Q. 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’
Q. What is an internal 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’
Q. Which of the following is not an advantage of optimised bubble sort over other sorting techniquesin case of sorted elements?
a. It is faster
b. Consumes less memory
c. Detects whether the input is already sorted
d. Consumes less time
Q. What is the best case efficiency of bubble sort in the improvised version?
a. O(nlogn)
b. O(logn)
c. O(n)
d. O(n2)
Q. What is an in-place sorting algorithm?
a. It needs O(1) or O(logn) memory to create auxiliary locations
b. The input is already sorted and in-place
c. It requires additional storage
d. It requires additional space
Q. In the following scenarios, when will you use selection sort?
a. The input is already sorted
b. A large file has to be sorted
c. Large values need to be sorted with small keys
d. Small values need to be sorted with large keys
Q. What is the advantage of selection sort over other sorting techniques?
a. It requires no additional storage space
b. It is scalable
c. It works best for inputs which are already sorted
d. It is faster than any other sorting technique
Q. What is the disadvantage of selection sort?
a. It requires auxiliary memory
b. It is not scalable
c. It can be used for small keys8
d. It takes linear time to sort the elements
Q. The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and selection sortrespectively are,
a. 5 and 4
b. 4 and 5
c. 2 and 4
d. 2 and 5