Domanda di colloquio di Capital One

Design question for technical, in python or java. Didn't run code, didn't need advanced data structures.