I'm trying to determine the entry for the worst case of Karb-Rabin complexity, regardless of the hash function used. However, I am seeing these two answers on the internet:
- Chain "AAAAAAAA" and pattern "AAA"
- Chain "AAAAAAAB" and pattern "AAB"
Which of these entries would have the worst execution time in Karp-Rabin? Thank you!