#Program NamePatternTimeSpaceKey IdeaLevel
1numberOfIslands▼BFS / DFS GridO(m·n)O(m·n)Flood-fill each unvisited land cell with DFS, counting how many floods started.Middle
2courseSchedule▼Topological Sort (Kahn)O(V+E)O(V+E)BFS from nodes with in-degree 0; cycle exists if not all nodes are processed.Middle
3cloneGraph▼BFS + HashMapO(V+E)O(V)Map original node → clone; BFS to visit neighbors and link clones.Middle