字符串中的第一个唯一字符
| Category | Difficulty | Likes | Dislikes |
|---|---|---|---|
| algorithms | Easy (54.73%) | 548 | - |
Tags
Companies
amazon | bloomberg | microsoft
给定一个字符串 s ,找到 它的第一个不重复的字符,并返回它的索引 。如果不存在,则返回 -1 。
示例 1:
| |
示例 2:
| |
示例 3:
| |
提示:
1 <= s.length <= 105s只包含小写字母
解法
| |
| Category | Difficulty | Likes | Dislikes |
|---|---|---|---|
| algorithms | Easy (54.73%) | 548 | - |
Tags
Companies
amazon | bloomberg | microsoft
给定一个字符串 s ,找到 它的第一个不重复的字符,并返回它的索引 。如果不存在,则返回 -1 。
示例 1:
| |
示例 2:
| |
示例 3:
| |
提示:
1 <= s.length <= 105s 只包含小写字母 | |
#{description}
#{ end }#{content}