Name: Student No.: Group:: Csc248 - Fundamentals of Data Structures Tree: Tutorial
Name: Student No.: Group:: Csc248 - Fundamentals of Data Structures Tree: Tutorial
TREE: TUTORIAL
GROUP : RCS1104C
QUESTION 1
Study the given Binary Tree and answer questions that follow:
(d) State the nodes visited if these traversal methods are used:
(a) 4
(b) 4
(c) 8 5 7 12
(d) (i) L RO RI = 9 5 1 7 2 12 |8| 4 3 11
(ii) RO L RI = 8| 5 9 7 1 12 2 | 4 11 3
CSC248 - FUNDAMENTALS OF DATA STRUCTURES
TREE: TUTORIAL
(iii) L RI RO = 9 1 2 12 7 5 |3 11 4| 8
QUESTION 2
(a) 2
(b) 235 and 123
(c) 111 150 456
(d) L RI RO = 111 150 123 | 456 | 235
(e) L RO RI = 111 150 123 |235| 456
CSC248 - FUNDAMENTALS OF DATA STRUCTURES
TREE: TUTORIAL
QUESTION 3
Traverse the following tree using in-order, pre-order and post-order traversal.
In-order= 2 7 4 8 | 9 | 10 11 15
Pre-order= 9 | 4 2 7 8 | 11 10 15
Post-order= 7 2 8 4 | 10 15 11 | 9
QUESTION 4
(a)