Pergunta de entrevista da empresa Indeed

Question about recursively changing the values of a tree