Add test and KarpRabin alg