Binary Tree Preorder Traversal
Description
Given a binary tree, return the preorder traversal of its nodes' values.
Example:
Follow up: Recursive solution is trivial, could you do it iteratively?
Code
Last updated
Was this helpful?
Given a binary tree, return the preorder traversal of its nodes' values.
Example:
Follow up: Recursive solution is trivial, could you do it iteratively?
Last updated
Was this helpful?