solution fro problem minimum depth of binary tree