From 42525fc3791f3cc342a75b4a53980db38943b1d5 Mon Sep 17 00:00:00 2001 From: ji-hyup Date: Fri, 1 May 2026 23:37:25 +0900 Subject: [PATCH] =?UTF-8?q?[=EB=B3=80=EC=A7=80=ED=98=91]Day01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01two_some.py" | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 "leetcode3/\353\263\200\354\247\200\355\230\221/01two_some.py" diff --git "a/leetcode3/\353\263\200\354\247\200\355\230\221/01two_some.py" "b/leetcode3/\353\263\200\354\247\200\355\230\221/01two_some.py" new file mode 100644 index 00000000..3e355785 --- /dev/null +++ "b/leetcode3/\353\263\200\354\247\200\355\230\221/01two_some.py" @@ -0,0 +1,24 @@ +# + +''' +1. 아이디어 : +- 완전 탐색 + +2. 시간복잡도 : + O(n^2) + +3. 자료구조/알고리즘 : + +''' + + +class Solution: + def twoSum(self, nums: List[int], target: int) -> List[int]: + for i in range(len(nums) - 1): + for j in range(len(nums) - i - 1): + sum = nums[i] + sum += nums[i+j+1] + if sum == target: + return [i,i+j+1] + + \ No newline at end of file