Preorder Traversal In Leetcode Contest Solution