Solution for minimum depth of Binary Trees