Tap here to switch tabs
Problem
Submissions

Problem: Lexicographically Smallest String Without Duplicates

Try to solve the Lexicographically Smallest String Without Duplicates problem.

Statement

You are given a string s consisting of lowercase English letters.

You can delete any number of duplicate characters from s such that each distinct character present in the original string remains at least once in the resulting string.

Return the lexicographically smallest string that can be formed after performing these deletions.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters only.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Lexicographically Smallest String Without Duplicates

Try to solve the Lexicographically Smallest String Without Duplicates problem.

Statement

You are given a string s consisting of lowercase English letters.

You can delete any number of duplicate characters from s such that each distinct character present in the original string remains at least once in the resulting string.

Return the lexicographically smallest string that can be formed after performing these deletions.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters only.