#4

First Unique Character Index

EASYHash TablePYTHON

Problem Description

Given a string `s`, find the first character that appears only once (unique character) and return its index (0-indexed). If no unique character exists, return `-1`. The string contains only lowercase English letters.

Topics

hash table

Asked at Companies

aircall

Solve This Problem

Sign up to access the interactive code editor, run test cases, view the editorial, and get AI-powered feedback on your solution.

Start Solving →