← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given two strings s and p, return the starting index of the first occurrence of an anagram of p in s. If no such anagram exists, return -1. An anagram is a permutation of the characters in p — it must contain exactly the same characters with the same frequencies, but in any order. You may assume that the input strings contain only lowercase English letters.