Pergunta de entrevista da empresa ServiceNow

basic algorithm question, some question on REST