Pergunta de entrevista da empresa IBM

Set an example and asked me how I would solve that problem