| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- state
- node.js
- Props
- priority_queue
- array
- Callback
- server
- BinaryTree
- bit
- count
- map
- css
- Navigation
- Context
- nodeJS
- UE5
- React
- 비트연산
- JSX
- queue
- routes
- DP
- c++
- axios
- MySQL
- leetcode
- event
- route
- component
- treenode
- Today
- Total
목록leetcode (21)
우사미 코딩
1. 문제링크 Sort List - LeetCode Can you solve this real interview question? Sort List - Given the head of a linked list, return the list after sorting it in ascending order. Example 1: [https://assets.leetcode.com/uploads/2020/09/14/sort_list_1.jpg] Input: head = [4,2,1,3] Output: [1, leetcode.com 지맘대로 생긴 ListNode를 오름차순으로 정렬하는 문제 2. Key Point - 제일 미니한 단위로 쪼갠다(재귀호출), merge한다 1) ListNode를 두개로 나눈다 - s..
1. 문제링크 Rotate Image - LeetCode Can you solve this real interview question? Rotate Image - You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place [https://en.wikipedia.org/wiki/In-place_algorithm], which m leetcode.com 2. 매트릭스 변환 2회 1) mat[i][j] mat[j][i] 1 2 3 1 4 7 4 5 6 -> 2 5 8 7 8 9 3 6 9 2) 각 row를 revers 1 4..
1. 문제 링크 Happy Number - LeetCode Can you solve this real interview question? Happy Number - Write an algorithm to determine if a number n is happy. A happy number is a number defined by the following process: * Starting with any positive integer, replace the number by the sum of the squar leetcode.com 2. n을 한자리수로 쪼개서 제곱한 값을 모두 더한 값이 1이되면 해피넘버 input이 해피넘버이면 true 리턴, 아니면 false리턴 - Input: n = 19 1^..
https://leetcode.com/problems/power-of-two/ Power of Two - LeetCode Can you solve this real interview question? Power of Two - Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such that n == 2x. Example 1: Input: n = 1 Output: leetcode.com 주어진 입력값이 2의 거듭제곱이면 true, 아니라면 false를 반환하는 문제 1) input : n = 1 ou..
코딩을 할 때 꼭 알아야 하는 개념인 "시간 복잡도"와 "공간 복잡도" 코딩을 하다보면 알고리즘과 데이터 구조를 선택할 때, 코드의 성능과 효율성을 고려해야 하는데 이때 시간 복잡도와 공간 복잡도는 중요한 평가 지표로 사용된다. 시간복잡도는 알고리즘이 동작하는 데 걸리는 시간의 양을 나타내는데 알고리즘이 얼마나 빠른지를 측정하는 것으로, 대개 Big O 표기법을 사용한다. (Big O notation) 공간복잡도는 알고리즘이 사용하는 메모리 공간의 양을 나타낸다. 알고리즘이 얼마나 많은 메모리를 사용하는지를 측정하는 것으로, 또한 Big O 표기법을 사용하여 표현한다. 시간복잡도와 공간복잡도는 알고리즘의 성능을 평가하는 중요한 지표로 사용한다. leetcode의 문제를 보면 제약조건에 시간복잡도나 공간복..