In the following code, what is the algorithm's complexity?
?
minIndex = 0currentIndex = 1

while currentIndex < len(lyst): if lyst[currentIndex] < lyst[minIndex]: minIndex = currentIndex currentIndex += 1return minIndex
?

A. O(n2)
B. O(n)
C. O(log2n)
D. O2

Answer: B

Computer Science & Information Technology

You might also like to view...

How does a ScreenTip add to a presentation?

What will be an ideal response?

Computer Science & Information Technology

Which item is not part of the primary security categories?

A. Encryption B. Detection C. Recovery D. Prevention

Computer Science & Information Technology