0% found this document useful (0 votes)
9 views1 page

Old Phone Keypad Input Converter

The document presents a coding challenge to design a method that converts input from an old phone keypad into corresponding letters. It explains how each button on the keypad represents multiple letters and requires pauses between consecutive presses of the same button. Examples of input and expected output are provided, along with instructions to post the solution on GitHub and email it to a specified address.

Uploaded by

oakkarkyaw344
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Old Phone Keypad Input Converter

The document presents a coding challenge to design a method that converts input from an old phone keypad into corresponding letters. It explains how each button on the keypad represents multiple letters and requires pauses between consecutive presses of the same button. Examples of input and expected output are provided, along with instructions to post the solution on GitHub and email it to a specified address.

Uploaded by

oakkarkyaw344
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

C# Coding


Challenge
1 &’( def
3
2 abc

4 ghi mno
6
5 jkl
Here is an old phone keypad with alphabetical letters, a
7pqrs 9
wxyz
backspace key, and a send button. 8 tuv

Each button has a number to identify it and pressing a button


0
multiple times will cycle through the letters on it allowing

each button to represent more than one letter.

For example, pressing 2 once will return ‘A’ but pressing twice

in succession will return ‘B’.

You must pause for a second in order to type two characters from the same

button after each other: “222 2 22” -> “CAB”.

Prompt:

Please design and document a class of method that will turn any input to OldPhonePad 


into the correct output.

Assume that a send “#” will always be included at the end of every input.

public static String OldPhonePad(string input) {

// Please write your implementation here!

Examples:

OldPhonePad( “33#”) => output : E

OldPhonePad( “227*#”) => output : B

OldPhonePad( “4433555 555666#”) => output : HELLO

OldPhonePad( “8 88777444666*664#”) => output : ?????

Please post your solution to GitHub and email turing@[Link]

You might also like