Graph Theory37 sections · 1633 units
Open in Course

Quiz: LCA via Binary Lifting

Knowledge check

Check Your Understanding

In the LCA algorithm, after equalizing depths you jump both nodes upward in decreasing powers of 22. Why do you skip a jump when up[u][k] == up[v][k]?

  1. A.Because you want to stop just below the LCA, not at or above it
  2. B.Because you have found the LCA at that point
  3. C.Because equal ancestors mean the nodes share a subtree
  4. D.Because the table entry is invalid at that level
Start the roadmap to answer the quizzes and solve the challenges