Class Solution
java.lang.Object
g0301_0400.s0387_first_unique_character_in_a_string.Solution
387 - First Unique Character in a String.<p>Easy</p>
<p>Given a string <code>s</code>, <em>find the first non-repeating character in it and return its index</em>. If it does not exist, return <code>-1</code>.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> s = “leetcode”</p>
<p><strong>Output:</strong> 0</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> s = “loveleetcode”</p>
<p><strong>Output:</strong> 2</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> s = “aabb”</p>
<p><strong>Output:</strong> -1</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= s.length <= 10<sup>5</sup></code></li>
<li><code>s</code> consists of only lowercase English letters.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
firstUniqChar
-