DSA for Interviews
Back to Trees, Graphs, and Recursion

Quiz: Graph Representation and Traversal

The three ways to represent a graph; when BFS beats DFS; the patterns for grid/matrix problems treated as graphs.

7 minutesInteractive tutorial
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Question 1 of 9Answer saved0 answered

Why does BFS find a shortest path by number of edges in an unweighted graph, but not generally a minimum-cost path in a weighted graph?