Self Dividing Numbers (LeetCode 728)

Self Dividing Numbers (LeetCode 728)


Self Dividing Numbers (LeetCode 728)

Definition

A number is self-dividing if every digit divides it and no digit is zero.

Implementation

For each candidate in [left,right], extract digits with `%10` / `//10` and test.

Interview note

Mention early exit on digit `0`. Keep the helper pure for unit tests.

Practice OA-style loops with AI help for online coding assessments.

Report Page