Computer Science, asked by aayush592, 11 months ago

Replace multiple occurances of characters by single character and print in reverse order.Example if input:aaaaEEeeecccCCCGEExffe then output:efxEGCceEa
Input Format
A string
Constraints
Assume input is only one line
Output Format
A string with characters appearing only once in reverse order.
Sample Input 0
xxxyyZZZzCCCde
Sample Output 0
edCzZyx
Explanation 0
We are printing in reverse and each continuous repeated character is replaced with only one.

Answers

Answered by Kritu16
3

Answer:

The abswer will be xyZ0 hope it will help u.

If it works then mark my answer as the brainlist answer.

Thank you

Answered by vishnuvardhank0504
0

Answer:

Replace multiple occurances of characters by single character and print in reverse order. Example if inputsaaaaEEeeecccCCCGEExffe then

output efxEGCceEa

Input Format

A string

Constraints

Assume input is only one line

Output Format

A string with characters appearing only once in reverse order

Sample Input 0

xxxyyZZZzCCCde Sample Output 0

edCzZyx Explanation 0

Coding 30 Marks)

We are printing in reverse and each continuous repeated character is replaced with only one.

Sample Input 1

aabaabaabaab Sample Output 1

Similar questions