일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- easy
- math
- tree
- string
- Array
- 재귀
- two pointers
- Medium
- Python
- Depth-first Search
- list
- 쉬움
- sorting
- 문자열
- hash table
- 리트코드
- Binary
- 중간
- HashTable
- backtracking
- binary search
- 이진트리
- leetcode
- matrix
- linked list
- DP
- recursive
- 미디움
- dfs
- binary tree
- Today
- Total
목록math (16)
부부의 코딩 성장 일기

1. 문제 링크 https://leetcode.com/problems/valid-perfect-square/description/ Valid Perfect Square - LeetCode Can you solve this real interview question? Valid Perfect Square - Given a positive integer num, return true if num is a perfect square or false otherwise. A perfect square is an integer that is the square of an integer. In other words, it is the product o leetcode.com 2. 문제 설명 양의 정수 num이 주어졌..
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/nim-game/description/ 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. 문제 설명 Nim Game 규칙 table에 돌무더기가 있다고 가정했을 때, 나와 나의 친구가 번갈아가면서 차례가 오고, 나 먼저 시작한다. 각 차례에서, 1~3개의 돌을 무더기에서 제외할 수 있고,..
1. 문제 링크 https://leetcode.com/problems/missing-number/description/ 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. 문제 설명 range[0,n] 사이의 숫자를 중복없이 포함하고 있는 nums라는 array가 주어졌을 때, range[0,n] 범위 해당 array에 빠진 숫자가 1개 있다고 할 때, 그 ..
1. 문제 링크 Ugly Number - LeetCode Ugly Number - LeetCode Can you solve this real interview question? Ugly Number - An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5. Given an integer n, return true if n is an ugly number. Example 1: Input: n = 6 Output: true Explanation: 6 = leetcode.com 2. 문제 설명 주어진 숫자가 Ugly Number인지 판별하는 문제 Ugly Number란 오직 2, 3, 5 세 소수의 곱으로만 이루어..
1. 문제 링크 https://leetcode.com/problems/add-digits/description/ 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. 문제 설명 정수 num이 주어졌을 때, 반복해서 각 자릿수를 더하여, 더한 값이 한자리가 될 때까지 반복하여, 해당 값을 반환 예시) num=38이라면, 3과 8을 더하면 11. 11은 두자리수이..
1. 문제 링크 https://leetcode.com/problems/power-of-two/description/ 2. 문제 설명 정수 n이 주어졌을 때, 만약 해당 수가 2의 거듭제곱이면 True를 아니면 False를 반환 예시1) n=1일 때, 1은 2의 0 거듭제곱이므로 True 반환 예시2) n=16일 때, 16은 2의 4 거듭제곱이므로 True 반환 예시3) n=3일 때, 3은 2의 거듭제곱이 아니므로 False를 반환 3. 처음 풀이 Follow up에서 loops나 recursion을 쓰지 않고, 풀 수 있는지를 물어봐서 다른 방법을 생각해보다가, 10진법을 2진법으로 바꾸었을 때, 2의 거듭제곱이라면 10000, 100, 10 등의 형태일 것이기 때문에, 1을 제외한 값을 int로 변환했..

1. 문제 링크 https://leetcode.com/problems/unique-binary-search-trees/description/ Unique Binary Search Trees - LeetCode Can you solve this real interview question? Unique Binary Search Trees - Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. Example 1: [https://assets.leetcode leetcode.com 2. 문제 설명 정수 n이..