These values are entered into an ordered binary tree: Mercury, Venus, Earth, Mars, Jupiter, Saturn and Uranus.
The resulting binary tree is supposed to be this.
Mercury
/ \
Earth Venus
\ /
Jupiter Saturn
\ \
Mars Uranus
Is there any reason for this order? Shouldn't Jupiter be under the Venus branch?
Marsshould be a right child ofEarthandJupitershould be a left child ofMarsbecause theJupiternode won't exist when insertingMars. See this question for the correct ordering - Binary Search Tree of Strings (before balancing).