Pregunta de entrevista de Nextdoor

array in string and re-arrange dfs problem