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.
advertisement

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.

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.
advertisement

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.

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.

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!

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn