#reversing a string inside a loop

1 messages · Page 1 of 1 (latest)

patent epoch
#
      [M]             [Z]     [V]
      [Z]     [P]     [L]     [Z]
  [S] [D]     [W]     [W]     [H]
  [P] [V] [N] [D]     [P]     [C]
  [H] [B] [J] [V] [B] [M]     [N]
  [V] [F] [L] [Z] [C] [S] [P] [S]
  [F] [J] [M] [G] [R] [R] [H] [R]
  [G] [G] [G] [N] [V] [V] [T] [Q]

text to reproduce

fickle jackal
#
    println(stack[i])
    stack[i] = reverse(stack[i])
    println(stack[i])```
yields 

MZ
ZM``` as the first two outputs on your input

#

at least on my end

#

I think your issue might be that you're reversing the data before you might want to

#

if you reverse the stack while populating your lists, you end up reversing the list, and then later appending some character or another