I have a list containing few elements like this: [1, 1, 2, 2, 3, 3]. I want to combine these numbers into one number without summing them so I want the final number to be: 112233; Is there a way to do it
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
you can use reduce method from list
result maximum value is 2^63-1, otherwise you will get an overflow!!!
You should use
list.join()
method: