Added code for problem 4.5 and also added a new class BinaryTree