$10K coding deathmatch

Shane Hathaway shane at hathawaymix.org
Thu Nov 2 17:53:03 MST 2006


Andy Bradford wrote:
> So, unless  I'm reading my Python  code incorrectly, it would  appear that
> I'm not the  only one that misinterpreted which sequence  should be used
> when making the comparision.

Actually, Josh used "sequence" in one part of the sentence and "set" in
the other, which is enough to clarify that the two are distinct.  Yes,
some of the solutions posted here mixed them up.

"We are looking for sequences of n > 0 integers where the absolute
values of the differences of successive elements are included in the set
of numbers 1 through n - 1."

I hope this serves as a warning to the contestants for the $10k prize!
I would write an automated test for your program before submitting it.
In fact, you'll probably get the most benefit if you write the test
before writing the program.  The test is just as valuable as the code.

Oh, and get lots of sleep.

Shane




More information about the PLUG mailing list