Binary Tree Preorder Traversal*
Given a binary tree, return the preorder traversal of its nodes' values.
Example
Given:
return [1,2,4,5,3].
Solution
Last updated
Was this helpful?
Given a binary tree, return the preorder traversal of its nodes' values.
Given:
return [1,2,4,5,3].
Last updated
Was this helpful?