Skip to content
Q49Section DA (Data Science and Artificial Intelligence (Q11–Q65))49 of 65

Comparing bubble sort and insertion sort behaviour on a nearly sorted array

Consider the problem of sorting the given array in ascending order:

P = [1, 2, 3, 5, 4]

Consider two sorting algorithms Bubble Sort (BS) and Insertion Sort (IS). Let N1 be the total number of comparisons done by BS on the elements of P and N2 be the total number of comparisons done by IS on the elements of P. Which of the following options is/are correct?

Multiple select: one or more options are correct. Select all of them, then submit — marks need the exact set.

Options

Select every correct option, then submit.