Intel Corporation Interview Question

traverse a binary tree and print each layer