Sam's Club interview question

Usual data structures and algorithms.