Skip to content
RED SAG Skills
hard20 pts · first answer countsgraphslcatrees

Answering many LCA queries fast

A tree has 10^5 nodes and you must answer 10^6 LCA queries. Which approach gives O(1) per query after preprocessing?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions