Question d’entretien chez Capital One

Justify using one data structure over the other for this problem.