2👍
What I would do is initialize a ‘padding’ array of the numbers 1 through 9, remove any numbers from the array that are in your data array, pop numbers from the padding array into the data array until the data array is of length 10, and then sort() the data array.
Source:stackexchange.com