문제

리트코드 316. Remove Duplicate Letters
난이도: ⭐⭐⭐

Given a string s, remove duplicate letters so that every letter appears once and only once. You must make sure your result is the smallest in lexicographical order among all possible results.
(중복된 문자를 제외하고 사전식 순서로 나열하라)

예시 1

Input: s = "bcabc"
Output: "abc"

예시 2

Input: s = "cbacdcbc"
Output: "acdb"

나의 풀이:


Tags:

Categories:

Updated: