Solved MaximumDepthOfBinaryTree in java