Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Enumerate all substrings of s with the same length as sub, and compare each substring to sub for equality.
How can you quickly tell if a character of s can result from replacing the corresponding character in sub?