A-level Computing/AQA/Problem Solving, Programming, Operating Systems, Databases and Networking/Programming Concepts/Trees traversal algorithms for a binary tree

Exercise: Binary Trees

Create a binary tree for the following data input:

5, 2, 6, 8, 4, 1, 9, 7, 3

Answer:

Sorted tree

Create a binary tree for the following major city input:

Monaco, Paris, Vatican, Rome, Norwich, Lewisham, New York, Partington

Answer:

sorted major global cities. This tree is very right heavy and if you continue Computer Science to University level you would be asked to find ways of balancing trees
Category:Book:A-level Computing#AQA/Problem%20Solving,%20Programming,%20Operating%20Systems,%20Databases%20and%20Networking/Programming%20Concepts/Trees%20traversal%20algorithms%20for%20a%20binary%20tree%20
Category:Book:A-level Computing