Apply Operations to Make String Empty

Given a string s, repeat the following operation until s becomes empty: for each character from 'a' to 'z', if it exists in s, remove its first occurrence.

Return the value of the string `s...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: