Find the First Anagram Occurrence
Given two strings, lookup and query, implement anagram_index(lookup, query). Return the starting index of the first contiguous substring of lookup that is an anagram of query. Return -1 if...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
