Miscellaneous on Data Structure and Algorithms related Questions and Answers


Question :   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?
1. O(n)
2. O(q)
3. O(n*q)
4. O(n+q)
Answer :   3 - O(n*q)  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter