ServiceNow interview question

Data Structures and Algoritms, Grapsh and Strings