Tiny Sentence Reversal

Discussion of challenges you have already solved
Post Reply
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Tiny Sentence Reversal

Post by gfoot »

Having said I don't like posting in "Challenges Solved" threads about KOTH challenges... :)

I think at least one of test cases for this challenge should be longer - more characters overall, more words, more characters per word - or the challenge should be more explicit about the scale of the input that should be supported.

If the scale is not explicit, then a passing program ought to work on arbitrarily long input, so the test cases should also check that. Otherwise, there's a lot of scope here for something similar, e.g. using the one-line fibonacci looping constructs (@@@@@) to concisely loop but with a specific maximum number of iterations.

I'm enjoying this one, for some reason - I keep ending up cramming everything into a small space, but finding myself with just one character that I can't fit in!

I do have some code in my latest one which reads backwards later in the program, which was nice. :)
tails
Posts: 191
Joined: Tue Jun 10, 2008 7:51 pm
Location: Tokyo

Post by tails »

I finally did it with 44 instructions. It took a whole year! :)

My code got very tricky:

Code: Select all

$+1v+$?d^3*48\%00s/,1\
!$?^$?x-1Pvx>\?^20\s@/
Is there some simpler way?
Post Reply