mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
24 lines
566 B
HTML
24 lines
566 B
HTML
<p>Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures?</p>
|
|
|
|
|
|
|
|
<p><strong>Example 1:</strong></p>
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
<strong>Input: </strong><code>s</code> = "leetcode"
|
|
|
|
<strong>Output: </strong>false
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<p><strong>Example 2:</strong></p>
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
<strong>Input: </strong><code>s</code> = "abc"
|
|
|
|
<strong>Output: </strong>true
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
|
|
|
<p><strong>Note:</strong></p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><code>0 <= len(s) <= 100 </code></li>
|
|
|
|
</ul>
|
|
|