Java Solution - Greedy (1ms, 100%)
First we find out the list of distinct chars with acs order.\nFor each char, if all other chars can be found after the char, then accept the char and remove it 
First we find out the list of distinct chars with acs order.\nFor each char, if all other chars can be found after the char, then accept the char and remove it from the list, else try next char.\n\n```\nclass Solution {\n\tString check(String str, char c, List<Character> clist) {\n\t\tint idx = str.indexOf(c);\n\t\tString s0 = str.substring(idx + 1);\n\n\t\tfor (char c0 : clist)\n\t\t\tif (c0 == c)\n\t\t\t\tcontinue;\n\t\t\telse if (s0.indexOf(c0) < 0)\n\t\t\t\treturn null;\n\t\treturn s0;\n\t}\n\n\tpublic String smallestSubsequence(String text) {\n\n\t\tString text0 = text;\n\n\t\tint[] arr = new int[26];\n\t\tfor (char c : text0.toCharArray())\n\t\t\tarr[c - \'a\']++;\n\n\t\tList<Character> clist = new ArrayList<>();\n\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\tif (arr[i] > 0)\n\t\t\t\tclist.add((char) (\'a\' + i));\n\n\t\tStringBuilder result = new StringBuilder();\n\t\twhile (clist.size() > 0) {\n\t\t\tIterator<Character> it = clist.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tchar next = it.next();\n\t\t\t\tString checked = check(text0, next, clist);\n\t\t\t\tif (checked != null) {\n\t\t\t\t\ttext0 = checked;\n\t\t\t\t\tit.remove();\n\t\t\t\t\tresult.append(next);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result.toString();\n\t}\n}\n```
[]