Search
⌘K
Get Premium
Leetcode 2575. Find the Divisibility Array of a String
Given a digit string and an integer m, return an array marking which prefixes of the string form numbers divisible by m; the core challenge is to efficiently check divisibility for each prefix by maintaining the running remainder (mod m) to handle large prefixes in O(n) time.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.