642. Remove All Adjacent Duplicates in a String
0
Easy
Given a string s consisting of lowercase English letters, the task is to remove adjacent duplicate letters from s until no more removals can be made. Print the final string after all duplicate removals have been made. It is guaranteed that the answer is unique.
Input Format
The input consists of a single line containing the string s.
Output Format
Print the final string.
Example
Input
abbaca
Output
ca
Constraints
1 <= |s| <= 10^5
s consists of lowercase English letters.
Loading...
View Submissions
Console