J.P. Morgan Interview Question

How to implement a depth first search for a binary tree