Solved

What Type of Algorithm Is the Following Code

Question 46

Multiple Choice

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

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions