IBM interview question

How to implement depth first search in Java?