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 when we apply MO's algorithm?

A. O(n*q)

B. O(n)

C. O((q+n)√n)

D. O(q*√n)

Answer: Option C


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

Join The Discussion

Related Questions on Miscellaneous on Data Structures