Frontier
A frontier is a collection of discovered search states that remain candidates for exploration or expansion.
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
A frontier is the collection of discovered search states that remain candidates for exploration.
- How it is used
- Holds maze-search candidates until depth-first search, breadth-first search, or A* selects them for exploration.
- How deep it goes
- Works through frontier initialization and search loops, then varies the container across three algorithms without a formal analysis.
- Examples
- Uses a grid maze and Swift search functions with stack, queue, and priority-queue frontiers.
- What you can do after
- Operate/configure a maze search by choosing a stack, queue, or priority queue as its frontier.
Learn Haskell by Example
A frontier is the collection of graph nodes currently being explored or awaiting expansion in a search.
- How it is used
- Organizes breadth-first graph exploration by tracking nodes currently being visited and preparing the next search layer.
- How deep it goes
- Explains frontier updates procedurally, including child collection, visited-node deletion, predecessor recording, and termination checks.
- Examples
- Uses graph-layer diagrams, a word-ladder search, and typed search-state and breadth-first-search definitions.
- What you can do after
- Apply the frontier pattern to implement breadth-first path searches with visited-node tracking and predecessor-based reconstruction.
Related concepts
- breadth-first searchused by · Breadth-first search is a graph or tree traversal algorithm that explores nodes in nondecreasing order of their distance from a starting node.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

