Limited depth for graph BFS/DFS.