Question
1-In some places is common to remember a phone number associating its digits to letters. In this way the expression AUK CSIS means 285 2747.
1-In some places is common to remember a phone number associating its digits to letters. In this way the expression "AUK CSIS" means 285 2747. Some phone numbers can not form a word or a phrase and the digits 1 and 0 are not associated to any letter. Your task is to read an expression and find the corresponding phone number based on the table below. An expression is composed by the capital letters (A-Z), hyphens (-) and the numbers 1 and 0.
Sample Input 1-HAPPY-ENDING MY-GRADUATION-SOON
Sample Output 1- 42779-363464 69-4723828466-7666
2-You're typing a long text with a broken keyboard that sometimes the "home" key or the "end" key gets automatically pressed (internally). You're not aware of this issue, since you're focusing on the text. Note that '[' means the "Home" key is pressed internally, and ']' means the "End" key is pressed internally. Your task is to fix any given text with these special characters "Home" and "End". Note that "Home" means you moved to the beginning of the line and "End" means you moved to the end of the line.
Sample Input This_is_a_[Test]_text [[]][][]Ramadan Mubarak[]
Sample Output TestThis_is_a__text Ramadan Mubarak
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started