What is the best possible approach for this question:
Deduct from given number up or til 0. The results are to be stored dynamically (in an array).
Example 1.