Problem 2575 · Medium

Find the Divisibility Array of a String

Track the remainder of each growing prefix modulo m, extending it one digit at a time instead of rebuilding the number.

Open the interactive visualisation