Data Structures & AlgorithmsHardICPC regional · geometry
Problem: Which algorithm finds all integer points on the convex hull boundary of a set of points?
- A. Dijkstra's algorithm
- B. Gale-Shapley
- C. Euler's algorithm
- D. Andrew's monotone chain with cross products
Correct answer: D. Andrew's monotone chain with cross products
Cross-product turn tests on sorted points build the hull in O(n log n).
More Coding Interview Problems questions
- Problem: What is the purpose of the 'sqrt decomposition' technique for an array?
- Problem: Which statement about the 'Chinese remainder theorem' is correct for non-coprime moduli?
- Problem: What is the complexity of computing the Euler totient for all numbers up to n with a linear sieve?
- Problem: Which technique computes the sum of a function over all subsets of a set of size n in O(n 2^n)?
- Problem: What does the cross product of two 2D vectors (a, b) and (c, d) equal?
- Problem: Which approach finds the k-th lexicographically smallest substring of a string?