Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3448. Count Substrings Divisible By Last Digit
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source