adplus-dvertising
frame-decoration

Question

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

a.

O(1)

b.

O(n)

c.

O(n^2)

d.

O(n^3)

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 recursive implementation used to find the largest and the smallest element in an array?