Add more applications of depth-first search