Vidyalelo
Data Structure · Q360

Miscellaneous on Data Structures

Programming · Data Structure · question 360

Q360

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)
Answer
D.
O(q*√n)

Answer: Option C

Solution

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