| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
- list
- HashTable
- backtracking
- sorting
- math
- two pointers
- 리트코드
- dfs
- Depth-first Search
- easy
- 문자열
- matrix
- binary search
- DP
- linked list
- 쉬움
- string
- 재귀
- binary tree
- recursive
- tree
- Array
- 이진트리
- 중간
- Python
- 미디움
- Medium
- Binary
- leetcode
- hash table
- Today
- Total
목록분류 전체보기 (147)
부부의 코딩 성장 일기
1. 문제 링크 https://leetcode.com/problems/roman-to-integer/ 2. 문제 설명 문제 자체는 심플, 로마 숫자를 정수로 반환하는 함수 (I, V, X ,L, .. 에 대응되는 정수값은 제공이 된다) 다만 숫자로 변환되는 규칙이 약간 생소 → 알고리즘 보다는 규칙을 찾는게 핵심 예시) II : 1+1=2, XII : 10+1+1=12, XXVII : 10+10+2+5=27 헷갈리는 규칙 4는 IIII라 쓰지 않고, IV로 표현 - 5에서 1을 뺀 값으로 작성 I는 4,9를 만들기 위해 V,X 앞에 등장할 수 있고, X는 40,90을 만들기 위해 L,C앞에 등장 가능 3. 처음 풀이 로마 문자를 key, 대응되는 정수를 value로 한 dictionary를 사전에 정의를..
1. 문제 링크 Palindrome Number - LeetCode Palindrome Number - LeetCode Can you solve this real interview question? Palindrome Number - Given an integer x, return true if x is a palindrome, and false otherwise. Example 1: Input: x = 121 Output: true Explanation: 121 reads as 121 from left to right and from right to left. Ex leetcode.com 2. 문제 설명 주어진 int를 뒤에서 앞으로 읽었을 때 같은 정수인 지 판단하는 문제 예시) int=121 이면 ..
1. 문제 링크 https://leetcode.com/problems/two-sum/ 2. 문제 설명 list와 target 숫자가 주어졌을 때, list의 두 수를 더했을 때 target 숫자가 되는, index list를 반환하는 문제 예시) nums = [2,7,11,15], target = 9 → output [0,1] 3. 처음 풀이 이중 for문을 돌려서, nums[i]와 nums[j]를 더한 게 target이면 index를 반환 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]+num..