Skip to main content

One post tagged with "Stack"

View All Tags

Remove Duplicate Letters

· 5 min read
Phanuphat (Oad) Srisukhawasu
Computer Science Undergraduate @ NUS

Consider a string of lowercase characters. This problem asks us to remove the duplicate characters from the string and return the result string that has the lowest lexicographical order among the possible outcomes. Indeed, this problem is the same as finding the subsequence of unique characters (that has the lowest lexicographical order).