Data Structures & Algorithms Multiple Choice Questions on “Cubesort”.
1. Which of the following is an example of parallel sorting technique? Answer: c 2. What is the worst case time complexity of cube sort? Answer: c 3. What is the auxiliary space requirement of cube sort? Answer: a 4. What is the best case time complexity of cube sort? 5. What is the average case time complexity of cube sort? Answer: b 6. Which of the following algorithm is stable? Answer: d 7. Cube sort is an in place sorting algorithm. Answer: b 8. Which of the following is a disadvantage of cube sort? Answer: a 9. Cube sort is a comparison based sort. Answer: a 10. Which of the following sorting algorithm uses the method of insertion?
a) bogo sort
b) sleep sort
c) cube sort
d) merge sort
Clarification: Out of the given options only cube sort is a parallel sorting algorithm. It builds self balancing multi dimensional arrays from the input keys.
a) O(n)
b) O(log n)
c) O(n log n)
d) O(n2)
Clarification: The worst case performance of cube sort is O(n log n). This is the fastest possible complexity with a comparison based sort.
a) O(n)
b) O(1)
c) O(log n)
d) O(n log n)
Clarification: Cube sort requires an auxiliary space of O(n). This is the worst case of auxiliary space complexity.
a) O(n2)
b) O(n)
c) O(n log n)
d) O(1)
Answer: b
Clarification: Best case time complexity of cube sort occurs when the input array is almost sorted. So in such a case only O(n) time is required for sorting.
a) O(n2)
b) O(n log n)
c) O(log n)
d) O(n)
View Answer
Clarification: The average case performance of cube sort is O(n log n). This is the fastest possible complexity with a comparison based sort.
a) heap sort
b) cube sort
c) quick sort
d) bogosort
Clarification: Out of the given algorithms only cube sort is stable. This implies that the relative position of equal valued elements in the input and sorted array remains the same.
a) true
b) false
Clarification: Cube sort has an auxiliary space complexity of O(n). So it does not qualify to be an in-place sort.
a) high memory overhead for small data
b) high memory overhead for any data
c) balancing is slow
d) Iteration is slow
Clarification: In a general case the memory overhead of cube sort is low. But when the data set is small then in that case the memory overhead becomes high.
a) true
b) false
Clarification: Cube sort is a comparison based sorting algorithm. This is because it compares elements in order to sort them.
a) cube sort
b) bubble sort
c) quick sort
d) selection sort
Answer: a
Clarification: Cube sort is the only algorithm from the given ones that uses the method of insertion. Other than this, the insertion sort also uses the method of insertion for sorting.
