Delivered by FeedBurner

New Answers in your Inbox

CS62 Jan 2001 3a algorithm of iteractive version of pre-order traversal

Q. Write an algorithm of iteractive version of pre-order traversal.

Ans:
The recursive algorithm of preorder traversing is listed below:
Preorder (Node)

Step1: [Looop through step no. 3]
if Node is not equal to NULL value
Display Inforamtion [Node]
Step2: Make a Call to Preorder(LeftChild [Node])
Step3: Make a Call to Preorder(RightChild [Node])
Step4: Quit