Graph Theory37 sections · 1633 units
Open in Course

Quiz: Company Queries II

Knowledge check

Check Your Understanding

Company Queries II: Find the LCA of two employees in a company tree. What technique should you use?

  1. A.Floyd-Warshall on the tree
  2. B.DFS from both nodes until paths meet
  3. C.BFS from the root
  4. D.Binary lifting with O(log⁡n)O(\log n) preprocessing per node
Start the roadmap to answer the quizzes and solve the challenges