MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Inefficient way to sort a list.
A
Bubble sort
B
Insertion sort
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Bubble Sort, however, is not considered efficient for large pieces of data as it takes a lot of time. In computer programming, bubble sort has a time complexity of O(n log) (n is the number of elements in the dataset). It is not considered very good for efficient coding.

Detailed explanation-2: -Though bubble sort is simple and easy to implement, it is highly impractical for solving most problems due to its slow running time. It has an average and worst-case running time of O ( n 2 ) O

There is 1 question to complete.