There are a few threads on skiena\'s (buggy) initial implementation of dfs. There are also a couple on DFS being prone to infinite loop. However, even after including Skiena