rabin-karp algo
build fsm to search substring