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.
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.