find the minimum depth of tree using recursion