checkPath

fun checkPath(vararg path: Int): Int
fun checkPath(path: List<Int>): Int

Check if a path can be traversed from this node

Return

  • 0 for success

    • -1 if the path was empty

    • index in the path at which the traversal failed