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.


  1. From Calvin Hsia, unoptimized version in Fox Pro.  (My comments)
  2. From Justin Rogers, in C#.  (My comments)
  3. From Michael Scholz, in C++.
  4. From myself, in Haskell.
  5. From Frans Bouma, in C#.
  6. From Calvin Hisa, optimized version in Fox Pro.
  7. From Nicholas Allen, in JScript.
  8. From Brian C Robinson, in Python.  (Test case, example)
  9. From Anton Triest, in XSLT.  (Demo)
Comments (8)

  1. 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.

  2. PS > Awaiting a new challenge 😉

  3. 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.

Skip to main content