Making A Large Island
LeetCode problem #827
Detect Cycle in Undirected Graph (DFS/BFS, Union-Find)
Learn graph cycle detection in an undirected graph using DFS/BFS parent tracking or Union-Find (DSU). O(V+E). Step-by-step—practice now.
Longest Consecutive Sequence
Find the length of the longest consecutive elements sequence in an unsorted array.
Minimum Spanning Tree (MST): Kruskal vs Prim (DSU)
Learn what a minimum spanning tree is + MST algorithm steps. Kruskal (Union-Find) O(E log E) vs Prim (heap) O(E log V). Practice now.
Number of Islands
Count the number of islands in a 2D grid