Pergunta de entrevista da empresa Dynamic Yield

Architecture question, simple code task and talking about my experience