The title prolly ain't clear at all. You are given a string $s$ and a string $t$. For every substring $s$ of length $|t|$, you are to find the number of different characters between the substring of $s$ and $t$ in $O(n)$ or less. It is guaranteed that $|t| \le |s|$.↵
↵
Example:↵
s: abac↵
t: ag↵
output: [1, 2, 1]↵
↵
s: adfjaasd↵
t: asdf↵
output: [3, 4, 4, 4, 4]
↵
Example:↵
s: abac↵
t: ag↵
output: [1, 2, 1]↵
↵
s: adfjaasd↵
t: asdf↵
output: [3, 4, 4, 4, 4]