Examveda

What will be the worst case time complexity of code to find sum in given query range (l,r) in an array of size n with q number of such queries?

A. O(n)

B. O(q)

C. O(n*q)

D. O(n+q)

Answer: Option C


This Question Belongs to Data Structure >> Miscellaneous On Data Structures

Join The Discussion

Related Questions on Miscellaneous on Data Structures