i want solution program for this program......
Given a string and a non-empty substring sub, compute the largest substring which starts and ends with sub and return its length.
test cases:
strDist("catcowcat", "cat") → 9
strDist("catcowcat", "cow") → 3
strDist("cccatcowcatxx", "cat") → 9