[Solved] Rolling Hash Contest Problem
![[Solved] Rolling Hash Contest Problem [Solved] Rolling Hash Contest Problem](https://realcoder.techss24.com/wp-content/uploads/2022/06/Solved-Rolling-Hash-Contest-Problem.png)
You are given a string S and a Pattern P. You need to find all matches of hash of P in string S. Also, print the index (0 based) at which the pattern’s hash is found. If no match is found, print -1. Note: All the matches should have same length as pattern P.…