You are not logged in. Please login at www.codechef.com to post your questions!

×

RMQ : Best Time Complexity

What is the best time complexity one can achieve in finding LCA using RMQ(Static)??

I know RMQ using Sparse Table==>Preprocessing Time: O{NlogN) Query:O(1)

Segment Tree.Preprocessing Time: O{N) Query:O(logN).

Is there method with preprocessing time O(N) and Query : O(1)??

asked 10 Jul '17, 11:40

jaypatel3998's gravatar image

3★jaypatel3998
414
accept rate: 0%

edited 10 Jul '17, 11:54


toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,755
×56
×33

question asked: 10 Jul '17, 11:40

question was seen: 291 times

last updated: 10 Jul '17, 13:18