Pergunta de entrevista da empresa Superfish

No difficult or unexpected question. Simple coding questions.