Pergunta de entrevista da empresa Scientific Games

I got some programming question about how to build a data structure