You are viewing a single comment's thread. Return to all comments →
hello coding lover,
I have uploaded a tutorial on this problem which can solve this problem in O(N+Q) time.
I hope this comment will help you to optimize your solution.
https://www.hackerrank.com/challenges/sparse-arrays/forum/comments/598644
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
hello coding lover,
I have uploaded a tutorial on this problem which can solve this problem in O(N+Q) time.
I hope this comment will help you to optimize your solution.
https://www.hackerrank.com/challenges/sparse-arrays/forum/comments/598644