Make The String Great Problem

Make The String Great Problem — ExecCode Easy DSA Practice

Solve the Make The String Great problem on ExecCode. Free online easy DSA practice in String. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given a string s of lower and upper case English letters. Your task is to compute the required answer and return the string after making it good. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where: - 0 <= i <= s.length - 2 - s[i] is a lower-case letter and s[i + 1] is the same letter but in upper-case or vice-versa. To make the string good, you can choose two adjacent characters that make the string bad and remove them.

Examples

Input {"s": "leEeetcode"}; Output leetcode. Input {"s": "abBAcC"}; Output

Constraints

1 <= s.length <= 100 s contains only lower and upper case English letters.

Practice Make The String Great free on ExecCode. Browse DSA problems, topic map, and placement guides.