Solutions to the Phraser programming challenge
On 3/29/04 I posted a programming challenge: given a telephone number, find all possible ways to represent it using English words and digits.
Several people have submitted their solutions. This page contains a list of all the entries I received, in the order of submission. It will be updated as I receive more solutions.
- From Calvin Hsia, unoptimized version in Fox Pro. (My comments)
- From Justin Rogers, in C#. (My comments)
- From Michael Scholz, in C++.
- From myself, in Haskell.
- From Frans Bouma, in C#.
- From Calvin Hisa, optimized version in Fox Pro.
- From Nicholas Allen, in JScript.
- From Brian C Robinson, in Python. (Test case, example)
- From Anton Triest, in XSLT. (Demo)
Comments
- Anonymous
April 06, 2004
Just to give the heads up, I revised the algorithm to 148 lines of code (I think this might be less than before). The mapping table is still the largest code-part. And the algorithm, while fast for a single operation or single number, truly excells at multiple numbers where the mapping table only needs to be processed the first time. - Anonymous
April 06, 2004
PS > Awaiting a new challenge ;-) - Anonymous
April 07, 2004
Submission entry 2 has been updated again as of this morning. The performance of a single number run has tripled, and the performance of multi number runs outperforms even that.