Skip to content

Commit c5d6267

Browse files
committed
Create README - LeetHub
1 parent 4313423 commit c5d6267

File tree

1 file changed

+27
-0
lines changed
  • 1159-smallest-subsequence-of-distinct-characters

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h2><a href="https://leetcode.com/problems/smallest-subsequence-of-distinct-characters">1159. Smallest Subsequence of Distinct Characters</a></h2><h3>Medium</h3><hr><p>Given a string <code>s</code>, return <em>the </em><span data-keyword="lexicographically-smaller-string"><em>lexicographically smallest</em></span> <span data-keyword="subsequence-string"><em>subsequence</em></span><em> of</em> <code>s</code> <em>that contains all the distinct characters of</em> <code>s</code> <em>exactly once</em>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
6+
<pre>
7+
<strong>Input:</strong> s = &quot;bcabc&quot;
8+
<strong>Output:</strong> &quot;abc&quot;
9+
</pre>
10+
11+
<p><strong class="example">Example 2:</strong></p>
12+
13+
<pre>
14+
<strong>Input:</strong> s = &quot;cbacdcbc&quot;
15+
<strong>Output:</strong> &quot;acdb&quot;
16+
</pre>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Constraints:</strong></p>
20+
21+
<ul>
22+
<li><code>1 &lt;= s.length &lt;= 1000</code></li>
23+
<li><code>s</code> consists of lowercase English letters.</li>
24+
</ul>
25+
26+
<p>&nbsp;</p>
27+
<strong>Note:</strong> This question is the same as 316: <a href="https://leetcode.com/problems/remove-duplicate-letters/" target="_blank">https://leetcode.com/problems/remove-duplicate-letters/</a>

0 commit comments

Comments
 (0)