You are given a string text consisting of lowercase English letters.
Your task is to remove duplicate letters so that each letter appears exactly once in the resulting string.
The final string must be the smallest possible in lexicographical order among all valid results.
Input: text = "cbacdb"
Output: "acdb"
Input: text = "bcacbac"
Output: "abc"
Accepted:
Submission: