Join Regular Classroom : Visit ClassroomTech

Coding Questions | Distinct Characters | Codewindow.in

As a part of picnic events, the families from ABC apartment plan to organize some games for their kids so that they can learn something during leisure time also. The task is as follows.
Given a string S, find the strig which has only the distinct character in S. The characters should be presented in the descending order of their occurrence. If the occurrence count of two characters is the same, the order for that two-character should be the same as it is in the input string.
Note: The string is case-Sensitive.

Input Format:
The input is a string that denotes the S.

Output Format:
The output is a string that denotes the modified string.

Example:
Input:
HelloWorld

Output:
loHeWrd

Solution:

Coming....
You Missed
Also Checkout