Question d’entretien chez Incorta

Solve the coming datastructure question?