DFS Memory Requirements

The memory used by DFS is linear in the depth of the search.

If a = 10 and d = 100 (not unreasonable for some graphs), a full DFS would require a stack of size 10 × 100 = 1000.