摘要:
参考资料:https://oi-wiki.org/ds/dsu/ 预备知识 并查集 (Union Set) 一种常见的应用是计算一个图中连通分量的个数。比如: a e / \ | b c f | | d g 上图的连通分量的个数为 2 。 并查集的主要思想是在每个连通分量的集合中,选取一个代表,作为 阅读全文
摘要:
All questions are simple level. Minimum Distance Between BST Nodes Question[783]: Given a Binary Search Tree (BST) with the root node root, return the 阅读全文