일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- leetcode
- math
- dfs
- linked list
- 재귀
- DP
- binary tree
- Depth-first Search
- Array
- 이진트리
- sorting
- tree
- binary search
- matrix
- 미디움
- backtracking
- string
- Binary
- 리트코드
- Medium
- list
- HashTable
- 문자열
- recursive
- 중간
- hash table
- 쉬움
- Python
- easy
- two pointers
- Today
- Total
목록수학 (2)
부부의 코딩 성장 일기
1. 문제 링크 https://leetcode.com/problems/power-of-three/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 문제 설명 정수 n이 주어졌을 때, 3의 거듭제곱이라면 True를 그렇지 않다면 False를 반환 즉, n에 대하여 n == 3^x 가 되는 정수 x가 존재한다면 True를 반환한다. 예시1) n= 27이면, ..
1. 문제 링크 https://leetcode.com/problems/add-binary/ 2. 문제 설명 이진법으로 구성된 두개의 문자열 a,b가 주어졌을 때, 두 개의 합을 이진법으로 반환 예시) a= "11", b= "1"이면 십진법으로 3+1= 4이고, 이를 다시 이진법으로 반환한 "100"을 반환 3. 처음 풀이 만약 두 문자열이 0이면 0을 반환, 두 문자열을 더한 값을 십진법으로 반환하고 → 다시 이진법으로 변환하는 식으로 풀이 "11"과 "1"을 더한 "12"를 십진법으로 변환하면, 2*1 + 1*2^1 = 4 4를 계속 2로 나누면서 이진법으로 변환 result = '' (sum_num = 4) result = '0' (sum_num = 2) result = '00' (sum_num = ..