compare 3 string matching algorithms: brute force algorithm, KMP algorithm and BM algorithm