you ve get string s consist small english letter some english letter good rest bada substre slr 1lrs string ss1s2ss s length string s string slsl1srthe substre slr good letter slsl1sr k bad one look sample explanation understand clearyour task find number distinct good substring give stre s two substring sxy spq consider distinct content different ie sxyspq