ACM-Solutions
ACM-Solutions copied to clipboard
if (len1<len2) , sum!=0
if (len1<len2) then substring never occurs in the 'str' string. So the sum=all distinct substrings of 'str' . Correct me if I am wrong.