problem solving/algorithm study
2023. 4. 28.
230426/ leetcode / python/ 387. First Unique Character in a String, 383. Ransom Note, 242. Valid Anagram
Problem 1 First Unique Character in a String - LeetCode Can you solve this real interview question? First Unique Character in a String - 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: leetcode.com Solution1 class Solution: def firstUniqChar(self, s: str) -> int: alphas = {..