Problem 3400 · Medium

Maximum Number of Matching Indices After Right Shifts

Slide one array to the right one step at a time and count the positions where it agrees with the other; keep the best count.

Open the interactive visualisation