Pergunta de entrevista da empresa J.P. Morgan

Coding problems: An integer is said to be self-descriptive if it has the property that, when digit positions are labeled 0 to N-1, the digit in each position is equal to the number of times that this digit appears in the number. Write a function that will check whether a given positive integer is self-descriptive. LeetCode 423.