mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
add leetcode problem-cn part6
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<p>给定一个字符串 <code>s</code> ,找到 <em>它的第一个不重复的字符,并返回它的索引</em> 。如果不存在,则返回 <code>-1</code> 。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> s = "leetcode"
|
||||
<strong>输出:</strong> 0
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> s = "loveleetcode"
|
||||
<strong>输出:</strong> 2
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> s = "aabb"
|
||||
<strong>输出:</strong> -1
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= s.length <= 10<sup>5</sup></code></li>
|
||||
<li><code>s</code> 只包含小写字母</li>
|
||||
</ul>
|
Reference in New Issue
Block a user