where the nodes have
no successors. After expanding these nodes, the search “backs up”
to the next shallowest node that still has unexplored successors.
This is unlike the BFS, which visits all the siblings of a node
before any children. In cases where the tree is very deep (has
many levels), a cutoff must be added at some depth to make sure
that the search terminates.