Friday, July 3, 2009

Map a phone number

Map a phone number (such as 023-254435-13) into all the strings which can be potentially generated with a phone keyboard. Please remeber that 1 has no mapping, 2 can be mapped into 'a' or 'b' or 'c', 3 can be mapped into 'd', or 'e', or 'f' and so on. Note that 7 can be mapped into 'p', 'q', 'r', 's', while 9 can be mapped into 'w', 'x', 'y', 'z'.

No comments:

Post a Comment