J.P. Morgan interview question

How to implement a depth first search for a binary tree