Data Structures & AlgorithmsVery hardICPC regional · parallel algorithms
Problem: Which operation does the 'pointer jumping' technique speed up in parallel algorithms, and what is its complexity?
- A. Finding list ranks or tree depths in O(log n) rounds
- B. Matrix multiplication in O(n)
- C. Sorting in O(1)
- D. Shortest path in O(V)
Correct answer: A. Finding list ranks or tree depths in O(log n) rounds
Repeated doubling of pointers finishes list ranking in log n rounds.
More Coding Interview Problems questions
- Problem: Which problem asks for the number of ways to walk exactly k steps on a graph from u to v?
- Problem: What is the purpose of path compression in a union-find structure?
- Problem: Which structure answers 'number of points in a rectangle' queries offline in O(log n) each using sorting and a Fenwick tree?
- Problem: What is the expected depth of a random binary search tree built from n distinct keys?
- Problem: What is the Hamming distance between 1011 and 1101 in binary?
- Problem: Which property must a graph have for Euler's theorem to guarantee an Euler circuit?