Revealing the frontier with stacks and queues
Summary
The article argues for thinking in stacks and queues over recursion for tree and graph problems, comparing DFS implementations and BFS using explicit frontiers. It highlights the frontier-as-data pattern to improve testability, pausing, and controllability in real-world scenarios, with Rust code examples and practical trade-offs.