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