Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3448. Count Substrings Divisible By Last Digit
Count how many substrings of a digit string represent numbers divisible by their nonzero last digit. Because n ≤ 1e5, the solution must avoid O(n^2) and instead use modular arithmetic per ending digit (only 1–9) to efficiently count valid substrings using residues/powers of 10.
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.