Back to Type Challenges

README

questions/09286-medium-firstuniquecharindex/README.md

latest1.2 KB
Original Source
<!--info-header-start--><h1>FirstUniqueCharIndex </h1><blockquote><p>by jiangshan <a href="https://github.com/jiangshanmeta" target="_blank">@jiangshanmeta</a></p></blockquote><p><a href="https://tsch.js.org/9286/play" target="_blank"></a> </p><!--info-header-end-->

Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. (Inspired by leetcode 387)

<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/9286/answer" target="_blank"></a> <a href="https://tsch.js.org/9286/solutions" target="_blank"></a> <!--info-footer-end-->