Breadth-First Search
how to explore trees level by level using a queue, find shortest paths in unweighted structures, and recognize when BFS beats DFS
Sign in with your Google or GitHub account to get started
how to explore trees level by level using a queue, find shortest paths in unweighted structures, and recognize when BFS beats DFS
██████╗ ██████╗ ██████╗ ██╗███████╗ ██████╗████████╗██╗ ██╗ ██████╗ ██╗ ██╗████████╗██╗ ██╗ ██████╗ ██╗ ██╗███████╗███████╗ ██╔══██╗██╔══██╗██╔═══██╗ ██║██╔════╝██╔════╝╚══██╔══╝██║ ██║██╔════╝ ██║ ██║╚══██╔══╝██║ ██║██╔═══██╗██║ ██║██╔════╝██╔════╝ ██████╔╝██████╔╝██║ ██║ ██║█████╗ ██║ ██║ ██║ ██║██║ ███╗███████║ ██║ ███████║██║ ██║██║ ██║███████╗█████╗ ██╔═══╝ ██╔══██╗██║ ██║██ ██║██╔══╝ ██║ ██║ ██║ ██║██║ ██║██╔══██║ ██║ ██╔══██║██║ ██║██║ ██║╚════██║██╔══╝ ██║ ██║ ██║╚██████╔╝╚█████╔╝███████╗╚██████╗ ██║ ███████╗██║╚██████╔╝██║ ██║ ██║ ██║ ██║╚██████╔╝╚██████╔╝███████║███████╗ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝