Algorithm to Traverse Binary Tree

Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in preorder.

Questions by Dheerendra_juli

Showing Answers 1 - 3 of 3 Answers

ratanlal

  • Aug 14th, 2009
 

preorder(node root)
if root=NULL;
return
else
do
print "root->data" 
preorder(root->left)
preorder(root->right)
end else

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions