category

Graphs

Traversal, flood fill, and exploring connected components.

Course Scheduleinteractive

Decide if all courses can be finished — i.e. the prereq graph has no cycle.

Medium
Clone Graphinteractive

Make a deep copy of an undirected graph — every node and edge duplicated.

Medium
Number of Islandsinteractive

Count connected components of land in a 2-D grid.

Medium
Graph Valid Treeinteractive

Is this graph a tree? Exactly n−1 edges and no cycles.

Medium