Pregunta de entrevista de ServiceNow

Easy algorithms. They don't care a lot about syntax