You are given a non-negative integer n. Your task is to determine whether all its digits are distinct.
If every digit appears exactly once, return Yes. If any digit appears more than once, return No.
Input: n = 1234
Output: Yes
Explanation: Every digit appears exactly once, so all digits are distinct.
Input: n = 1223
Output: No
Explanation: The digit 2 appears twice, so the digits are not all distinct.
Input: n = 7
Output: Yes
Explanation: A single-digit number has no repeated digits, so all its digits are distinct.
Sign in to write, run, and submit your solution against the full test suite.