https://www.codechef.com/COOK118B/problems/CHEFSHIP

how to solve CHEFSHIP problem using KMP algorithm

See my solution here and explanation here.

1 Like