Amazon Interview Question

print vertically the binary tree