Binary Tree Traversal | AQA A Level Computer Science 7517 | 20 Worksheets + Answers
Binary tree traversal practice for AQA A Level Computer Science (7517): twenty
different worksheets on pre-order, in-order and post-order traversal, each
with a complete answer key.
Every worksheet is built on a different binary tree, and no two trees in the
pack have the same shape. You can set one sheet in class, a second for
homework and a third for a resit without ever setting the same questions
twice, and without drawing new trees yourself at eleven o’clock at night.
WHAT YOU GET
20 worksheets, 3 pages each, numbered 01 to 20
20 matching answer keys
A contents table listing the number of nodes, the mark total and the
traversal shown in question 3 for every sheet, so you can pick a
seven-node tree for a ten-minute starter or a twelve-node one for a full
period
WHAT IS ON EVERY SHEET
Question 1 asks for all three traversals of the same tree, which is the point:
pre-order, in-order and post-order only make sense against each other.
Question 2 is answered from a table of nodes rather than from the diagram -
Index, Left, Data, Right, with -1 for a missing child - and asks for a named
child, the leaves and the depth. Question 3 shows a recursive subroutine and
asks which traversal it performs, what it is used for, what stops the
recursion, and what the same subroutine would output if it were called on a
subtree.
Mark totals are printed at the top of each sheet and beside every question.
Sheets run from 17 to 20 marks, on trees of seven to twelve nodes.













