Pregunta de entrevista de Sankey Solutions

Solve a nested array and make it a normal array