samedi 25 août 2018

How to check no of substrings?

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.

Aucun commentaire:

Enregistrer un commentaire