Given a positive integer n, split it into its non-zero base-101010 place-value components and return them in descending order.
n
A base-101010 component is a number of the form dimes10kd imes 10^kdimes10k, where 1≤d≤91 \leq d \leq 91≤d≤9 and k≥0k \geq 0k≥0. The sum of all returned components must equal n.
Constraints:
1≤1 \leq1≤ n ≤109\leq 10^9≤109
Now, let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Compute Decimal Representation
What is the correct output for the input 900000001?
900000001
([900000000, 1])
([900000001])
([900000000, 10, 1])
([90000000, 1])
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Implement your solution in the following coding playground.