Union Find
Union Find¶
- 990. Satisfiability of Equality Equations
- 959. Regions Cut By Slashes
- 952. Largest Component Size by Common Factor
- 947. Most Stones Removed with Same Row or Column
- 928. Minimize Malware Spread II
- 924. Minimize Malware Spread
- 886. Possible Bipartition
- 839. Similar String Groups
- 827. Making A Large Island
- 803. Bricks Falling When Hit
- 785. Is Graph Bipartite?
- 778. Swim in Rising Water
- 765. Couples Holding Hands
- 737. Sentence Similarity II
- 721. Accounts Merge
- 711. Number of Distinct Islands II
- 695. Max Area of Island
- 694. Number of Distinct Islands
- 685. Redundant Connection II
- 684. Redundant Connection
- 547. Number of Provinces
- 399. Evaluate Division
- 3493. Properties Graph
- 3383. Minimum Runes to Add to Cast Spell
- 3378. Count Connected Components in LCM Graph
- 3235. Check if the Rectangle Corner Is Reachable
- 323. Number of Connected Components in an Undirected Graph
- 3108. Minimum Cost Walk in Weighted Graph
- 305. Number of Islands II
- 2948. Make Lexicographically Smallest Array by Swapping Elements
- 2852. Sum of Remoteness of All Cells
- 2812. Find the Safest Path in a Grid
- 2782. Number of Unique Categories
- 2709. Greatest Common Divisor Traversal
- 2685. Count the Number of Complete Components
- 2658. Maximum Number of Fish in a Grid
- 2617. Minimum Number of Visited Cells in a Grid
- 261. Graph Valid Tree
- 2573. Find the String with LCP
- 2503. Maximum Number of Points From Grid Queries
- 2493. Divide Nodes Into the Maximum Number of Groups
- 2492. Minimum Score of a Path Between Two Cities
- 2424. Longest Uploaded Prefix
- 2421. Number of Good Paths
- 2382. Maximum Segment Sum After Removals
- 2371. Minimize Maximum Value in a Grid
- 2368. Reachable Nodes With Restrictions
- 2334. Subarray With Elements Greater Than Varying Threshold
- 2316. Count Unreachable Pairs of Nodes in an Undirected Graph
- 2307. Check for Contradictions in Equations
- 2204. Distance to a Cycle in Undirected Graph
- 2157. Groups of Strings
- 2092. Find All People With Secret
- 2076. Process Restricted Friend Requests
- 2003. Smallest Missing Genetic Value in Each Subtree
- 200. Number of Islands
- 1998. GCD Sort of an Array
- 1971. Find if Path Exists in Graph
- 1970. Last Day Where You Can Still Cross
- 1905. Count Sub Islands
- 1724. Checking Existence of Edge Length Limited Paths II
- 1722. Minimize Hamming Distance After Swap Operations
- 1697. Checking Existence of Edge Length Limited Paths
- 1632. Rank Transform of a Matrix
- 1631. Path With Minimum Effort
- 1627. Graph Connectivity With Threshold
- 1584. Min Cost to Connect All Points
- 1579. Remove Max Number of Edges to Keep Graph Fully Traversable
- 1569. Number of Ways to Reorder Array to Get Same BST
- 1559. Detect Cycles in 2D Grid
- 1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
- 1391. Check if There is a Valid Path in a Grid
- 1361. Validate Binary Tree Nodes
- 1319. Number of Operations to Make Network Connected
- 130. Surrounded Regions
- 128. Longest Consecutive Sequence
- 1267. Count Servers that Communicate
- 1258. Synonymous Sentences
- 1254. Number of Closed Islands
- 1202. Smallest String With Swaps
- 1168. Optimize Water Distribution in a Village
- 1135. Connecting Cities With Minimum Cost
- 1102. Path With Maximum Minimum Value
- 1101. The Earliest Moment When Everyone Become Friends
- 1061. Lexicographically Smallest Equivalent String
- 1020. Number of Enclaves