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.

Input Format

Two strings s1 and s2

Output Format

A number(x) representing count of s2's anagrams which are present in s1. X space separated numbers representing start indices of anagrams.

Constraints

1 <= length of string <= 20,000

Example

Input
cbaebabacd
abc
Output
2
0 6 
Previous
Count Of Subarrays Having Sum Equals To K
Next
K Anagrams

Related Questions