題組內容

1. A string matching algorithm aims to find the occurrence of a string P within another string (5%)

(a) Use pseudo-code or C code to describe a string matching algorithm that has time complexity of O(NP*Ns), where Np and Ns are the lengths of P and S, respectively.