adplus-dvertising
frame-decoration

Question

What is the time complexity of the above iterative implementation used to find the largest and smallest element in an array?

a.

O(1)

b.

O(n)

c.

O(n^2)

d.

None of the mentioned

Answer: (b).O(n)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the time complexity of the above iterative implementation used to find the largest and smallest element in an array?