👨💻 counting1 [leetcode/JS] 387_First Unique Character in a String 풀이 🎲 문제 387. First Unique Character in a String Easy 문자열 s가 주어지면 그 안에 있는 첫 번째 비반복 문자를 찾아 인덱스를 반환합니다. 존재하지 않으면 -1을 반환합니다. 더보기 Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. Example 1: Input: s = "leetcode" Output: 0 Example 2: Input: s = "loveleetcode" Output: 2 Example 3: Input: s = "aabb" Output: -1 Constraints: 1 obj[key] === .. 2022. 11. 28. 이전 1 다음