How to check no of substrings of string s that contains string a and string a and b? For example if input is :ab c cabc . Answer should come as 3 as cabc as cabc has 3 substrings that include ab and c : cab,cabc,abc.
s
a
b
ab c cabc
Aucun commentaire:
Enregistrer un commentaire