I have been trying a lot but the problem with polynomial rolling hash function is ,the key is very large number and whenever i am creating a hashtable for separate chaining(to resolve collision) the core is getting dumped for long strings as they have very big hash values.