BreadthFirst

constructor(maxDepth: Int = -1)

Parameters

maxDepth

caps the traversal to nodes at depth at most maxDepth; a non-positive value (the default, -1) means "unbounded"