cpp solution for maximun depth of binary tree