What type of algorithm is the following code?
n = len(myList)while n > 1: i = 1 while i < n: if myList[i] < myList[i - 1]: swap(myList, i, i - 1) i += 1 n -= 1

A. linear sort
B. bubble sort
C. insertion sort
D. selection sort

Answer: B

Computer Science & Information Technology

You might also like to view...

Click the Distribute Rows Evenly button to change the row height to 0.3".

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Prompts you for input and then uses your answers to generate a customized report.

What will be an ideal response?

Computer Science & Information Technology