Let's say we have a string 'Welcome to OpenGenus' and a substring OGenus. Below is the implementation of the above approach: Time Complexity: O(m*n*log(n)), where n = length of string str1 and m = length of string str2Auxiliary Space: O(n). This is done by a simple formula counter & ( 1<