Pergunta de entrevista da empresa SurveyMonkey

Walk me through this code and tell me what’s wrong with it. How would you fix it?

Resposta da entrevista

Sigiloso

23 de mar. de 2026

I first explained what the code was trying to do, then pointed out the main correctness issues, edge cases, and maintainability problems. After that I proposed a cleaner fix, explained why I prioritized those changes, and described what tests I would add.