https://cp-algorithms.com/graph/lca.html
Before answering the queries, we need to preprocess the tree. We make a DFS traversal starting at the root and we build a list $\text{euler}$ which stores...
https://www.geeksforgeeks.org/roots-tree-gives-minimum-height/Given an undirected graph, which has tree characteristics (any connected graph without simple cycles is a tree.). It is possible to cho...