You probably have got tired of me, and my phone number phraser chanllenge, but you should check this one out.
Note that JScript is not statically typed, which means many type errors will not be detected until run time. This is a major drawback to me. I strongly prefer to work in a type safe language that is statically typed. Actually, many times when you get rid of all type errors in a Haskell program, it just works – a good type system allows you to express so much!
Nicholas used a trie from letters to words. I would use a trie from digits to sets of words. Since more than one letters map to one digit, this change will result in a much smaller trie (there are much fewer keys) and a much faster algorithm (we look up a whole set of words, instead of a single word, at one time).
Here’s Nicholas’ message:
“I was reading over the solutions today and found the variety interesting. The Haskell method was very well done and really showed off the language well. Some of the great features of functional languages like lambda and apply are starting to appear in C-like languages so maybe one day everyone will be able to solve problems like this so pithily 🙂
Note: to actually run this you'll need a JS interpreter that can handle files, such as Rhino.”