Pregunta de entrevista de Google

Phone interview. Solve Tree problem and array