GoLang Solution For LeetCode Problem: Binary Tree Preorder Traversal
Solving Binary Tree Preorder Traversal in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Given a binary tree, return the preorder traversal of its nodes' values.
Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,2,3]
Follow up: Recursive solution is trivial, could you do it iteratively?
See the full details of the problem Binary Tree Preorder Traversal at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go