MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
what is an advantage of bubble sort?
A
easy to implement
B
good efficiency
C
does not use much money
D
fast
Explanation: 

Detailed explanation-1: -One of the main advantages of a bubble sort is that it is a very simple algorithm to describe to a computer. There is only really one task to perform (compare two values and, if needed, swap them). This makes for a very small and simple computer program .

Detailed explanation-2: -The primary advantage of the bubble sort is that it is popular and easy to implement. The main disadvantage of the bubble sort is the fact that it does not deal well with a list containing a huge number of items. In the bubble sort, elements are swapped in place without using additional temporary storage.

Detailed explanation-3: -Bubble sorting can be a relatively slower sort, especially when you work with large data sets. Because of this, developers rarely use bubble sorting in commercial projects.

Detailed explanation-4: -Bubble Sort is one of the most widely discussed algorithms, simply because of its lack of efficiency for sorting arrays. If an array is already sorted, Bubble Sort will only pass through the array once (using concept two below), however the worst case scenario is a run time of O(N²), which is extremely inefficient.

There is 1 question to complete.