Data Structures & AlgorithmsModerateICPC regional · range queries

Problem: What is the complexity of a single query in a sparse-table range minimum structure?

  1. A. O(log n)
  2. B. O(n)
  3. C. O(sqrt n)
  4. D. O(1)

Correct answer: D. O(1)

The query combines two overlapping power-of-two blocks in constant time.

More Coding Interview Problems questions

Exams that ask this topic