Given a num of length n consisting of digits, determine if for every index i from n - 1, the digit i appears exactly num[i] times in num.
Return true if this condition holds for all indices, or false otherwise.
Constraints:
n == num.length
n
num consists of digits.
Given a num of length n consisting of digits, determine if for every index i from n - 1, the digit i appears exactly num[i] times in num.
Return true if this condition holds for all indices, or false otherwise.
Constraints:
n == num.length
n
num consists of digits.