Add KarpRabin algorithm