Inorder Traversal - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Inorder Traversal

Description:

Inorder Traversal. Traverse the left subtree. Visit the node. Traverse the right subtree. ... Preorder Traversal. Visit the node. Traverse the left subtree. ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 10
Provided by: depts169
Category:

less

Transcript and Presenter's Notes

Title: Inorder Traversal


1
Inorder Traversal
  • Traverse the left subtree.
  • Visit the node.
  • Traverse the right subtree.

2
Example Inorder
43
31
64
20
40
56
89
28
33
47
59
3
Preorder Traversal
  • Visit the node.
  • Traverse the left subtree.
  • Traverse the right subtree.

4
Example Preorder
43
31
64
20
40
56
89
28
33
47
59
5
Postorder Traversal
  • Traverse the left subtree.
  • Traverse the right subtree.
  • Visit the node.

6
Example Postorder
43
31
64
20
40
56
89
28
33
47
59
7
Example Infix

/
/
1
3

4
6
7
8
Example Postfix

/
/
1
3

4
7
6
9
Example Prefix

/
/
1
3

4
6
7

/
1
3
/

6
7
4
Write a Comment
User Comments (0)
About PowerShow.com