Time complexity of Sparse table query

Revision en1, by Siriuslight, 2017-09-16 03:25:44

I am little confused on time complexity of a query in sparse table. I got conflicting answers from two sources. On hackerearth O(logn) (link) is mentioned and on geeksforgeeks O(1) (link) is mentioned.

Can anyone tell me the correct time complexity?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Siriuslight 2017-09-16 03:25:44 419 Initial revision (published)