1.

Which of the following is an advantage of recursive bubble sort over its iterative version?(a) it has better time complexity(b) it has better space complexity(c) it is easy to implement(d) it has no significant advantageThe question was asked by my college director while I was bunking the class.This intriguing question comes from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

The CORRECT ANSWER is (d) it has no significant advantage

For explanation: RECURSIVE bubble sort has no significant advantage over ITERATIVE bubble sort. It is just a different WAY to implement the same.



Discussion

No Comment Found

Related InterviewSolutions