ServiceNow interview question

Basic coding and algorithms