First Unique Character in a String Problem
First Unique Character in a String Problem — ExecCode Easy DSA Practice
Solve the First Unique Character in a String problem on ExecCode. Free online easy DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Find the first non-repeating character in s and return its index, or -1. For First Unique Character in a String, focus on the exact input variables, return only the requested value, and preserve the required time complexity for the intended pattern.
Examples
Input s = "leetcode"; Output 0
Constraints
1 ≤ n ≤ 10^5 Values fit interview constraints
Practice First Unique Character in a String free on ExecCode. Browse DSA problems, topic map, and placement guides.