Skip to content
Leetcode
Esc
↑↓navigate↵open⌘Jpreview

Graph BFS

Nodes are visited in order of distance from the start, which gives the shortest path in an unweighted graph.

Last updated on September 24, 2026

Was this page helpful?