

Three ways to improve your InterviewStreet CodeSprint solution - ovechtrick
http://blog.drewinglis.com/?p=18

======
saryant
Indeed. I have to say I'm rather embarrassed that I have yet to get a solution
to pass every test case due to the time limit.

I've enjoyed the problems nonetheless. If nothing else it's been a good excuse
to learn some features of a few languages that I haven't used yet.

While I don't expect anything to come of this employment-wise (and yes, I am
looking) I'm glad to have participated.

------
Drbble
Is printing really so slow and unbuffered, and output so voluminous, that
output is really hotspot? The advice is completely opposite from real world
best practices. You should print as soon as you have any output, so that your
consumer can process output in a concurrent pipeline, and use a lower-level
(concurrent!) buffer to batch output in an environment-appropriate batch size,
for TCP or disk or whatever is underneath your app.

The other points, about using an efficient algorithm instead of a merely
correct one that assumes unreasonably large resources, are more on target.

Before coding any algorithm, always plug in the problem size bounds to your
O() function estimate. In these contests there is usually one obvious large
number that tells you where your algorithm needs to be sub-quadratic

