LeetCode
Binary Tree Preorder Traversal
Click
here
for an explanation.