result
of the same length as barcodes
.even
and odd
, to fill the result
array. Start with even
at index 0 and odd
at index 1.even
index and increment even
by 2.even
exceeds the length of the array, start placing barcodes at the odd
index and increment odd
by 2.result
array.