Search tree creation uses the
DEQ in the same way as graph
search.
So the space required for breadth-first and depth-first tree creation
will be the same as their graph counterparts, with b substituted
for a:
- Breadth-first: O(bd)
- Depth-first: O(b × d)