You are given a non-negative integer n. Your task is to determine whether its digits, read from left to right, are strictly decreasing.
Each digit must be smaller than the digit immediately before it. If any digit is equal to or greater than the previous digit, return No. Otherwise, return Yes.
Input: n = 9521
Output: Yes
Explanation: Each digit is smaller than the digit before it: 9 > 5 > 2 > 1.
Input: n = 9524
Output: No
Explanation: The final digit, 4, is greater than the preceding digit, 2, so the digits are not strictly decreasing.
Input: n = 7
Output: Yes
Explanation: A single-digit number satisfies the condition because there are no adjacent digits to compare.
Sign in to write, run, and submit your solution against the full test suite.