Cubesort Multiple Choice Questions and Answers (MCQs)

This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Cubesort”.

1. Which of the following is an example of parallel sorting technique?
a) bogo sort
b) sleep sort
c) cube sort
d) merge sort
View Answer

Answer: c
Explanation: Out of the given options only cube sort is a parallel sorting algorithm. It builds self balancing multi dimensional arrays from the input keys.

2. What is the worst case time complexity of cube sort?
a) O(n)
b) O(log n)
c) O(n log n)
d) O(n2)
View Answer

Answer: c
Explanation: The worst case performance of cube sort is O(n log n). This is the fastest possible complexity with a comparison based sort.

3. What is the auxiliary space requirement of cube sort?
a) O(n)
b) O(1)
c) O(log n)
d) O(n log n)
View Answer

Answer: a
Explanation: Cube sort requires an auxiliary space of O(n). This is the worst case of auxiliary space complexity.
advertisement
advertisement

4. What is the best case time complexity of cube sort?
a) O(n2)
b) O(n)
c) O(n log n)
d) O(1)
View Answer

Answer: b
Explanation: 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.

5. What is the average case time complexity of cube sort?
a) O(n2)
b) O(n log n)
c) O(log n)
d) O(n)
View Answer

Answer: b
Explanation: The average case performance of cube sort is O(n log n). This is the fastest possible complexity with a comparison based sort.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which of the following algorithm is stable?
a) heap sort
b) cube sort
c) quick sort
d) bogosort
View Answer

Answer: d
Explanation: 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.

7. Cube sort is an in place sorting algorithm.
a) true
b) false
View Answer

Answer: b
Explanation: Cube sort has an auxiliary space complexity of O(n). So it does not qualify to be an in-place sort.
advertisement

8. Which of the following is a disadvantage of cube sort?
a) high memory overhead for small data
b) high memory overhead for any data
c) balancing is slow
d) Iteration is slow
View Answer

Answer: a
Explanation: 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.

9. Cube sort is a comparison based sort.
a) true
b) false
View Answer

Answer: a
Explanation: Cube sort is a comparison based sorting algorithm. This is because it compares elements in order to sort them.
advertisement

10. Which of the following sorting algorithm uses the method of insertion?
a) cube sort
b) bubble sort
c) quick sort
d) selection sort
View Answer

Answer: a
Explanation: 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.

Sanfoundry Global Education & Learning Series – Data Structures & Algorithms.

To practice all areas of Data Structures & Algorithms, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.