[JavaScript] 10 lines solution (100%,80%)
Runtime: 72 ms, faster than 100.00% of JavaScript online submissions for Smallest Subsequence of Distinct Characters.\nMemory Usage: 39.4 MB, less than 80.00% o
Runtime: 72 ms, faster than 100.00% of JavaScript online submissions for Smallest Subsequence of Distinct Characters.\nMemory Usage: 39.4 MB, less than 80.00% of JavaScript online submissions for Smallest Subsequence of Distinct Characters.\n```\nvar smallestSubsequence = function(s) {\n    let stack = [];\n  for(let i = 0; i < s.length; i++){\n      if(stack.includes(s[i])) continue;\n   while(stack[stack.length-1]>s[i] && s.substring(i).includes(stack[stack.length-1])) stack.pop();\n      stack.push(s[i]);\n  }\n  return stack.join("");\n};\n```
['JavaScript']