Re-implement multi pattern Rabin Karp