Union Find
· ☕ 3 min read · 🦂 Kyle
Description from wiki: a disjoint-set data structure, also called a union–find data structure or merge–find set, is a data structure that stores a collection of disjoint (non-overlapping) sets
you can easily solve leetcode: 547. Number of Provinces w/ UF.
get UF template at github/sky-bro/AC/Algorithms/Union Find