package leetcode;

/**
 * https://leetcode.com/problems/smallest-subsequence-of-distinct-characters/
 */
public class Problem1081 {
    public String smallestSubsequence(String text) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1081 prob = new Problem1081();
        System.out.println(prob.smallestSubsequence("cdadabcc")); // "adbc"
        System.out.println(prob.smallestSubsequence("abcd")); // "abcd"
        System.out.println(prob.smallestSubsequence("ecbacba")); // "eacb"
        System.out.println(prob.smallestSubsequence("leetcode")); // "letcod"
    }
}

@@ -614,16 +614,89 @@
 letcod%22%0A
+        System.out.println(prob.smallestSubsequence(%22acbabc%22)); // %22abc%22%0A
     %7D%0A%7D%0A

Update problem 1081