Delivered by FeedBurner

New Answers in your Inbox

Showing posts with label Pre Order Traversal. Show all posts
Showing posts with label Pre Order Traversal. Show all posts

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