second version of Maximum depth of binary tree