Question: GenerateNewWord : Problem Description You are in process of developing a new language with the help of alphabet's, number and special characters. You can decide

GenerateNewWord : Problem Description You are in process of developing a new language with the help of alphabet's, number and special characters. You can decide your own sequence of these characters (alphabets, numbers, and special characters) while creating a new language. Suppose, you have created a sequence as something like "lkahgfswetimncx96345@#) (" and if the user enters any string like "Philacodist 2021" then your code should generate a new word with the help your new sequence by considering below rules: If the character of the string does not present in your sequence, then it should eliminate the character from the new word. If the character present in your sequence, then it should print as it is but you have to make sure it follows the same sequence, it means in the above example if the second character 'h' is present in the sequence but its position will not come second as fifth character 'a' will arrive before it as in our language sequence does matter. Assumption: Your sequence should not have duplicate characters, if contains then should display "New language Error" Alphabets are not case sensitive If string contains duplicate characters, then there will no change in position, it will remain as their places. Space is not a character, so include it in the same place as that in the string that to be translated. (Refer Examples section for more clarity). Constraints 1

Attachments:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!