Preorder Binary Tree
Given a binary tree, print the preorder traversal of given tree.
Given a binary tree, print the preorder traversal of given tree.
Elements in level order form (separated by space)
(If any node does not have left or right child, take -1 in its place)
Pre-order traversal, elements separated by space
8 3 10 1 6 -1 14 -1 -1 4 7 13 -1 -1 -1 -1 -1 -1 -1
8 3 1 6 4 7 10 14 13
Comments
Post a Comment
Please give us your valuable feedback