Pregunta de entrevista de Google

Sort a nested array ordered by the second element in the index