Let there be a string S which may or may not have another string Pattern as its substring (one or many instances)…
We need to find the minimum number of deletions to be performed on this string S such that pattern is no longer a substring of S…
I tried using dynamic with keeping a state as in KMP but could not formalize it…