Sorry, I see it is going from both ends... too early :) > On Dec 4, 2018, at 8:33 AM, Robert Engels <reng...@ix.netcom.com> wrote: > > Shouldn’t this code be index = index+ 2 > > for index := 0; index < (len/2)+1; index++ { > output[index], output[len-1-index] = input[len-1-index], input[index] > } > And the loop needs to go to Len - you are only copying half the elements.... > >> On Dec 4, 2018, at 5:27 AM, Iván Corrales Solera >> <ivan.corrales.sol...@gmail.com> wrote: >> >> for index := 0; index < (len/2)+1; index++ { >> output[index], output[len-1-index] = input[len-1-index], input[index] >> } > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.