Amazon Interview Question

Implement a Depth First Search Tree with alternating layers.