Remove Duplicates

Level EASY

Given a string S, remove consecutive duplicates from it recursively.

Input Format :
String S
Output Format :
Output string
Constraints :
1 <= |S| <= 10^3
where |S| represents the length of string
Sample Input 1 :
aabccba
Sample Output 1 :
abcba
Sample Input 2 :
xxxyyyzwwzzz
Sample Output 2 :
xyzwz

Comments

Popular posts from this blog

Access and modify all the resources of our Wiki.js using WikiJS API

How to pass parameters in webhook?

MySQL Multi Source Master Slave Replication using GTID