Programming Challenge



Peter Norvig has a programming challenge on his website. It's rather
old, from 1999, and the premise is kind of off: compare Java to Lisp.
However, ignoring the micro-benchmark discussion and the language vs.
language debate, the problem itself is interesting.


So I went ahead and tried it. I'm afraid I didn't do too well. I
misread the requirements (twice!) and part of the challenge is to
measure your speed as a coder, so while I wasn't the most extreme data
point (10 hours to code it up, iirc), I was well above the mean.

Anyway, now that I have it working, I found that the original input
files are not available. The website referenced is very old, and seems
to get "tired" while downloading the large files. So I'm wondering if
any else would like to test their skills against Peter's and the rest of
the sample, and share their solution. I have a version which should be
good and fast. I did find one possible large optimization, and I'm
wondering if other folks would find the same optimization, or handle the
large search space in a different way.

Program to follow! I'll let you work on it first before sharing my
solution. Don't forget to read the instructions, which say to produce a
"professional" result, but also to keep the source to one file (which
should make sharing over the internet easier).



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Latest member

Latest Threads