Programming Intermediate

Problem - 4800

You are given a string s consisting of lower case English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them. We repeatedly make duplicate removal on s until we no longer can. Return the final string after all such duplicate removals have been made.

Example:

Input : s = "abbaca"

Output :  "ca"

1. remove bb

2. remove aa


The solution for this problem is available for $0.99. You can also purchase a pass for all available solutions for $99.

report an error