Digits
Converts an integer to an array of digits.
- Use
strconv.Itoa()to convert the given number to a string,make()andlen()to create an appropriate slice. - Use
rangein combination withstrings.Split()to iterate over the digits, converting them tointusingstrconv.Atoi().