LeetCode
Print Binary Tree
Click
here
for an explanation.