Pergunta de entrevista da empresa Scopely

Gave small assignment to solve?