Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

Matuagkeetarp's blog

By Matuagkeetarp, history, 6 years ago, In English

I was learning rabin karp algorithm and solving a basic problem of finding indices of pattern in a string with the help of string hashing technique. But the code is just not printing out anything.

I used this algorithm yesterday to solve a problem and got AC but now I'm unable to find where's the issue.

here's my Code Please help.

  • Vote: I like it
  • -3
  • Vote: I do not like it

| Write comment?
»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Your getHash() function is not correct.

Spoiler