InterviewSolution
Saved Bookmarks
| 1. |
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)I have been asked this question in an online quiz.The above asked question is from Miscellaneous topic in portion Miscellaneous of Data Structures & Algorithms II |
|
Answer» Right answer is (c) O(n*q) |
|