Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 310 Bytes

File metadata and controls

13 lines (10 loc) · 310 Bytes

Problem 2: Singularity Detection

Problem Statement

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

Input Format

  • A string s.

Example

Input: s = "leetcode"
Output: 0 Input: s = "loveleetcode"
Output: 2