My friend's daughter had an assignment to find three animals which letters will add up to a hundred, "A" being one, "B" two, etc. After hours of adding they found two of the names, that is when I've heard of this problem. Well, I've cheated and used Clojure and fifteen minutes later I've got this
It was fun to write. Maybe I'll use it as an interview question :)
By the way the answer is:
([Chimpanzee 100] [Starfish 100] [Turkey 100])
[Update: The new assignment was to find as many words in the dictionary as possible with the same requirement. I hacked the code to find all the 2296 words in the words file on my machine. The gist is in the same place.]
Showing posts with label computation. Show all posts
Showing posts with label computation. Show all posts
Sunday, September 13, 2009
Sunday, February 18, 2007
NKS old and new
While reviewing a paper for the complex systems journal I've started looking around the web for my NKS summer school article and found this web page. It is so interesting to read what one wrote four years ago. Which is why I need to write more so I can read it later and write about it so I can read it later and write about it, etc.
P.S. Recursion is fun.
Subscribe to:
Posts (Atom)