Capital One Interview Question

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