This is like a basic maths, I traversed the list and added the correct place value of subsequent digits to the previous ones, making the initial digit the 1 that should be added to the whole digits.
I got the place value by raising 10 to the power of (the length of the list − 1 − the index).
Then, I built a list from the resulting total digits and returned it.