You are given a non-negative integer n. Your task is to return the number of distinct digits it contains.
A digit is counted only once, regardless of how many times it appears in the number.
Input: n = 1122334
Output: 4
Explanation: The distinct digits are 1, 2, 3, and 4, so the count is 4.
Input: n = 111
Output: 1
Explanation: Only the digit 1 is present, so the number contains one distinct digit.
Input: n = 1234567890
Output: 10
Explanation: Every digit from 0 to 9 appears, giving a total of 10 distinct digits.
Sign in to write, run, and submit your solution against the full test suite.