Data Structures & AlgorithmsModerateICPC regional · range queries
Problem: What is the complexity of a single query in a sparse-table range minimum structure?
- A. O(log n)
- B. O(n)
- C. O(sqrt n)
- 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
- Problem: What is the purpose of a 'suffix link' in Ukkonen's or Aho-Corasick's construction?
- Problem: Which property does an 'order statistics' tree support in addition to search?
- Problem: What is the time complexity of the 'Mo's algorithm with updates' (time dimension added) in terms of n and q?
- Problem: Which problem asks for the length of the shortest cycle in an undirected unweighted graph?
- Problem: Which theorem guarantees a perfect matching in a bipartite graph when Hall's condition holds for the smaller side?
- Problem: What is the main idea of the 'parallel binary search' technique?