You are given an integer array nums.
The concatenation of two numbers is the integer obtained by joining their digits together. For instance, the concatenation of
The array concatenation value is initially nums becomes empty:
If there are at least nums, pick the first element and the last element, concatenate their values, add the resulting number to the array concatenation value, and remove both elements from nums.
If there is only nums, add its value to the array concatenation value and remove it from nums.
Return the final concatenation value of nums.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
The concatenation of two numbers is the integer obtained by joining their digits together. For instance, the concatenation of
The array concatenation value is initially nums becomes empty:
If there are at least nums, pick the first element and the last element, concatenate their values, add the resulting number to the array concatenation value, and remove both elements from nums.
If there is only nums, add its value to the array concatenation value and remove it from nums.
Return the final concatenation value of nums.
Constraints:
nums.length
nums[i]