Vidyalelo
Data Structure · Q408

Miscellaneous on Data Structures

Programming · Data Structure · question 408

Q408

What will be the worst case time complexity of finding the sum of elements in a given range of (l,r) in an array of size n?

A.
O(n)
Answer
B.
O(l+r)
C.
O(l-r)
D.
O(r-l)

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board