Data Structures & AlgorithmsVery hardICPC regional · offline techniques
Problem: What is the main idea of the 'parallel binary search' technique?
- A. Run a single search with multiple threads
- B. Run binary searches for many queries simultaneously, sharing sweeps over the data
- C. Sort queries by value only
- D. Use hashing to skip comparisons
Correct answer: B. Run binary searches for many queries simultaneously, sharing sweeps over the data
Each round splits queries by midpoint and processes them together in one pass.
More Coding Interview Problems questions
- Problem: Which structure gives fast membership tests of substrings after O(n) construction (for a fixed alphabet)?
- Problem: What is the expected number of rounds of a randomised min-cut (Karger's algorithm) needed for a graph with n vertices to find a…
- Problem: What does the term 'amortised analysis' mean?
- Problem: What is the complexity of computing the number of inversions using a Fenwick tree over n distinct values?
- Problem: Which operation is the bottleneck of the naive recursive Fibonacci algorithm?
- Problem: What is the worst-case complexity of Heapsort on n elements?