Skip to main content

Breadth First Search

Traverse a tree in breadth first search order. Pass the root of the tree.

Usage

src/sample/bfs.ts
import { bfs } from 'athro';

const result = bfs(root);