Re: 15c LE programming contest entry - for the 34s? Message #7 Posted by Gene Wright on 2 Sept 2011, 8:02 a.m., in response to message #6 by Paul Dale
Oh, I wasn't sad at all. Richard Schwartz is an amazing person and merely coming up with the same code as he did, even if a bit later, :-) made me feel very nice.
Hey Pauli... how about a 34s program that does the same thing?
Random positive integers stored in 0 through 9. Sort the odd numbers first, then the even numbers. Examples of input and output:
Input stored in 0 through 9: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Output stored in 0 through 9: 1, 3, 5, 7, 9, 2, 4, 6, 8, 10.
Input stored in 0 through 9: 2, 2, 5, 1, 9, 4, 8, 8, 6, 3
Output stored in 0 through 9: 1, 3, 5, 9, 2, 2, 4, 6, 8, 8.
etc. Be good to see just how small and fast a 34s version would be.
|