Can some one help me in approaching this problem

Given string, we should print the character that is not repeating continuously
Input: aabbccdde
Output: e
Explanation: we are not printing ABCD because they are repeating continuously and we will be printing e
Input: eaae
output: ee
Explanation: we are printing e twice because they are not repeating continuously

Just sort the string and print all the character for which s[ i ] != s[ i+1 ] , or create a cnt array , cnt [ 26] , and for every character in string do cnt [ s[i]-‘a’] ++ , and then print the character for which the cnt is 1
EDIT : It is completely wrong I didn’t read the full problem :sweat_smile:

Are you sure?

Okkk sorry I didn’t read 2nd test case :sweat_smile:

Refer this code , the basic idea is that you are counting that till when current element is equal to the adjacent element if it’s not equal to adjacent character than its unique else not . Notice that I am doing I=j in a step as well.

Thank you so much buddy :grinning: