What is wrong with the code?
Mayank % (Modulo) is also used in hashing since you know that length of string can be as big as 1000 so power of prime will be more than even long long int . So modify it using Modulo.
Mayank % (Modulo) is also used in hashing since you know that length of string can be as big as 1000 so power of prime will be more than even long long int . So modify it using Modulo.