solve maximum depth of binary tree