Revert "Update Depth First Search"

This reverts commit 6aae4591c5f3bd9f9c72d545e776d050c5025c6c.