Pregunta de entrevista de ServiceNow

basic algorithm question, some question on REST