After watching this video Algorithms Live! Episode 3 — Rolling Hashes and Bloom Filters, I tried to implement pull character from last by myself and applying it on this problem here:
Problem: 1423. String Tale
Code : My code
Is my implementation wrong? if so, what is wrong in this? or can anyone give a code that works like the same principle as the video and works perfectly?
Thanks in advance.