ServiceNow Interview Question

Related to Anagrams and array