Added test cases for binary tree and improved its codes