Write a function to generate the pattern of given number as shown in example?
Login to Submit
Input: 3 Output: [1, 12, 123] Input: 5 Output: [1, 12, 123, 1234, 12345]