DFS or BFS
Count connected components
Given an undirected graph, count how many disconnected groups of vertices exist.
Advanced Topics in Computer Science
Students learn to model networks of relationships and solve problems involving paths, connectivity, and traversal.
Unit Focus
Graphs bring together sets, maps, queues, stacks, recursion, and algorithm efficiency in one major capstone unit.
Practice Work
Build a graph traversal visualizer or route finder.
Analyze a network dataset and report connected components and shortest paths.
DSA Assignment Bank
Code Scholars provides structured assignments, implementation support, edge-case review, and runtime analysis coaching so students learn the concept rather than only memorizing a solution.
DFS or BFS
Given an undirected graph, count how many disconnected groups of vertices exist.
BFS
Use BFS to find the fewest edges from a start vertex to a target and reconstruct the path.
DFS with parent tracking
Traverse a graph and identify a cycle without mistaking the edge back to the parent as a cycle.
DFS recursion states
Use visiting and finished states to detect whether a directed graph contains a cycle.
BFS coloring
Color neighboring vertices with opposite colors and detect conflicts.
DAG ordering
Given course prerequisites, produce a valid order or report that no order exists because of a cycle.
Directed connectivity
Explain how vertices can reach each other in directed graphs and outline a two-pass strategy.
Weighted graph with heap
Use a priority queue to find shortest paths when all edge weights are nonnegative.
Greedy graph design
Choose edges that connect all vertices with minimum total cost while avoiding cycles.
Grid graph traversal
Treat cells as graph vertices and recolor a connected region using BFS or DFS.
Grid components
Count connected groups of land cells and explain how marking visited cells prevents double counting.
Backtracking on graph
List every path from source to target in a directed acyclic graph.
Map old nodes to new nodes
Copy graph nodes and edges without duplicating shared neighbors incorrectly.
Connectivity sensitivity
Identify edges whose removal disconnects a graph and explain the role of discovery times.
BFS levels
Given a friendship graph, find everyone within two connections of a student.
Shortest path with constraints
Find a path in a road network while avoiding closed edges and reporting no path when necessary.
Topological reasoning
Given software package dependencies, determine a safe installation order.
BFS from start
Use BFS in a grid to find the closest boundary exit while avoiding walls.
Reachability
Given keys found in rooms, decide whether every room can be visited.
Union-find intuition
Process edges and identify the first edge that connects vertices already connected.
Graph robustness
Find vertices whose removal disconnects the graph and explain why they matter in network reliability.
Adjacency tradeoffs
Compare adjacency lists, adjacency matrices, and edge lists for dense and sparse graphs.
Graph statistics
Given an edge list, compute each vertex degree and identify isolated or highly connected vertices.
Binary search or modified Dijkstra
Find a path that minimizes the largest single edge cost encountered along the route.
DAG longest path idea
Given task durations and dependencies, compute the earliest completion time for the final task.
Two-hop neighbors
Recommend activities based on shared memberships while excluding activities already selected.
Traversal correctness
Given a BFS or DFS that marks visited too late, show how duplicates or loops can occur.
Traversal order
Given a graph and neighbor order, predict BFS and DFS visit orders.
Attack path modeling
Model systems as vertices and access paths as edges, then find shortest paths from an exposed node to a sensitive node.
DSA support
Create a graph assignment with representation choice, traversal code, path reconstruction, tests, and written analysis.
Work through the concepts, code, edge cases, and runtime analysis with 1:1 guidance.