Find All Anagrams In A String
medium
1. You are given two strings s1 and s2. 2. You have to find the count of s2's anagrams that are present in s1. 3. Also, you have to print the start indices of such anagrams in s1. Note -> Both s1 ad s2 consist of lowercase English letters only.
Constraints
1 <= length of string <= 20,000
Format
Input
Two strings s1 and s2
Output
A number(x) representing count of s2's anagrams which are present in s1. X space separated numbers representing start indices of anagrams.
Example
Sample Input
cbaebabacd
abc
Sample Output
2
0 6
Question Video