Pergunta de entrevista da empresa EGYM

System Design questions, refactoring bad solution