| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- swift
- Code Jam 2022
- LEVEL 2
- Code Jam
- 해커랭크
- hackerrank
- ProblemSolving
- Python
- Count Monobit Integers
- Kubernetes
- 리트코드
- C++
- First Unique Character in a String
- 프로그래머스
- leetcode
- Qualification Round
- ProblemSoving
- MySQL
- 코딩테스트
- Algorithm
- 알고리즘
- 2022
- 하늘과 바람과 별과 詩
- 3D PRINTING
- 하늘과 바람과 별과 시
- 문제해결
- GitLab
- 파이썬
- K8S
Archives
- Today
- Total
목록Two sum (1)
공대생의 비망록
[LeetCode][Easy] Two Sum 문제 Python 풀이
중첩 for-loop 사용: class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: for i in range(len(nums)): for j in range (i + 1, len(nums)): if nums[i] + nums[j] == target: return [i, j]시간복잡도 개선을 위해 Dictionary 자료구조를 활용하는 방식: class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: desiredTarget = {..
Programming Language/Python
2026. 2. 5. 14:17