samedi 21 février 2015

efficient searching in strings

what can be an efficient method to search pattern of abaabaSababab in longest string. Where abaaba is prefix and ababab is suffix to the shorter string. And S belongs to(a*.b*)*(any string that can be generated by symbols a & b).


For example, if the shorter string is: “abaSbab” and the longer string is: “ababababbababbaaabbaba” The output should be 13, because the shorter string occurs exactly 13 times in the longer string.


Aucun commentaire:

Enregistrer un commentaire