Various depth-first approaches to solving graph problems