00:01
We're given an ordered rooted tree and we're asked to determine the order in which the vertices of this tree are visited using a post -order traversal.
00:14
The tree is the one from exercise 9 of the section, so you'll want to refer to that figure for this problem.
00:22
In the first step, we begin with the post -order traversal of the sub -tree with root b.
00:30
So this sub -tree has root b, which has children, ef and g, and e has children kl and m, g has child n, and n has children r and s, followed by the post -order traversal of the subtree with root c, this is just c, followed by the post -order traversal of the subtree with root d.
01:19
This is the sub -tree with root d, which has children h, i and j, where h has child o and j has children p and q.
01:50
In the next step, we have the post -order traverse, okay, never mind.
01:57
In the first step, we also have, after all, this, the root of the tree a.
02:08
So now in the next step, we have the post -order traversal of the sub -tree with root e, and this tree has, this root has children, k, l, and m, followed by the post -order traversal of the sub -tree with root f.
02:30
This is f, followed by the post -order traversal of the sub -tree with root g.
02:39
This is a subtree with root g, which has child n, and n has children r and s, followed by c, followed by the post -order traversal of the subtree with root h.
02:57
This sub -tree has root h with child o, followed by the post -order traversal of the subtree with root i, which is just i, followed by the post -order traversal of the subtree with root j...