cyclic array
arr = [
[1, 2],
[3, 4],
]
output [13,14,23,34]
;
cyclic array
arr = [
[1, 2],
[3, 4],
[5, 6],
]
output [135136145146235236245246]
loop is unknown, and the length of each subarray of the array is unknown.
do you want to write a general method?