Depth-first search demonstration