MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
True or False:Merge sort is more efficient then bubble sort?
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -A merge sort is quicker and more efficient than a bubble sort when using longer lists.

Detailed explanation-2: -An advantage of merge sort over bubble sort is that it is much faster and therefore takes less time to sort large lists and lists that are more unordered.

Detailed explanation-3: -Merge sort is one of the most efficient sorting algorithms. It is based on the divide-and-conquer strategy. Merge sort continuously cuts down a list into multiple sublists until each has only one item, then merges those sublists into a sorted list.

Detailed explanation-4: -The bubble sort has a space complexity of O(1). The number of swaps in bubble sort equals the number of inversion pairs in the given array. When the array elements are few and the array is nearly sorted, bubble sort is effective and efficient.

Detailed explanation-5: -Merge Sort because its worst case time complexity is O(nlogn) whereas bubble sort and selection sort both take O(n^2) time .

There is 1 question to complete.