A / | \ B E F / \ /|\ C D G H Iwill be searched in the order ABEFCDGHI if a breadth-first search is performed on it (searching leftmost items first).

In agenda-based searching, that corresponds to the following steps:

- Add the first node to the agenda (in this case, A).
- Examine the first node on the agenda to see if it is the required item.
- Otherwise, expand the node (find all its children), and add those children to the
*end*of the agenda. - Repeat the second and third steps until the goal is reached.

The advantages to breadth-first search (over depth-first search) is that it is often faster, and will always find the shortest path possible. It can also deal with looping structures without getting stuck. The disadvantage is that it takes a lot of memory, and is therefore prone to failure when all available memory is used up.

A more memory-efficient compromise between breadth-first and depth-first search is known as the iterative deepening search.