摘要:
There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want 阅读全文
摘要:
推荐博客 : http://blog.csdn.net/lw277232240/article/details/72870644 LCA 就是去寻找最近公共祖先 ,如上图中 10 与 11 的LCA是 6 ,7 和 12 的LCA 是 4 。 通过这个我们可以解决的一类问题就是 求任意两点之间的距离 阅读全文