Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

What are some skills or characteristics of a "good" negotiator?

Answered: 1 week ago