On 16-2-2013 21:23, bearophile wrote:
Jos van Uden:

Yes, that was your original suggestion, but I didn't quite understand it,

When you don't understand something I say, please ask for more info :-)


You would reverse the left array when printing, is that correct?

Right, the second half of the tape keeps the cells in reverse order.

I've split the tape in left and right. It does make the code a bit
harder to understand and debug. A linkedlist would have been more
elegant, but slower I guess.

The stress test that was posted on the talk page, I've also added.
Our UTM produces the correct result but with redundant blanks on
both sides.

0111111222222220
 ^

http://codepad.org/2SK611Wd

Reply via email to