From d4404934326259b388e9c94e74e2c2d3597ccc4d Mon Sep 17 00:00:00 2001 From: nkey Date: Fri, 10 Jul 2026 10:36:57 +0900 Subject: [PATCH] =?UTF-8?q?easy/strings=20387=20=EC=84=B1=EA=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easy/strings/387.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 easy/strings/387.py diff --git a/easy/strings/387.py b/easy/strings/387.py new file mode 100644 index 0000000..68d8f88 --- /dev/null +++ b/easy/strings/387.py @@ -0,0 +1,21 @@ +# First Uniqye Character in a String + +from collections import Counter + +class Solution: + def firstUniqChar(self, s: str) -> int: + c = Counter(s) + for key in c: + if c[key] == 1: + return s.index(key) + else: + return -1 + + +""" +걸린 시간: 10:24~ + +복잡도: + +해설: +""" \ No newline at end of file