일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- treenode
- DP
- map
- c++
- array
- Navigation
- queue
- event
- count
- state
- MySQL
- leetcode
- 비트연산
- Props
- axios
- Context
- route
- JSX
- UE5
- bit
- component
- server
- css
- BinaryTree
- node.js
- routes
- priority_queue
- React
- Callback
- nodeJS
- Today
- Total
목록leetcode (21)
우사미 코딩
1. 문제링크 https://leetcode.com/problems/longest-arithmetic-subsequence Longest Arithmetic Subsequence - LeetCode Can you solve this real interview question? Longest Arithmetic Subsequence - Given an array nums of integers, return the length of the longest arithmetic subsequence in nums. Note that: * A subsequence is an array that can be derived from another array by leetcode.com 2. 키포인트 - dp사용한다. ..

1.문제링크 https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city 각 동그라미와 숫자는 도시번호인데 각 도시가 모두 0으로 연결되도록 하려면 화살표를 최소 몇개 바꿔야하는지 그 최소개수를 return하는것이 문제이다. 2. 키포인트 자료구조 : Graph 알고리즘 : dfs vector adj(n) 우선 각 도시에서 input, output 화살표로 모두 연결되는 도시를 adj에 기록한다 output 화살표 방향은 1, input 화살표 방향은 -1으로 기록한다. 그럼 adj는 0 : [1,1] [4,-1] 1 : [0,-1] [3,1] 2 : [3,1] 3 : [1,-1] [2,-1] 4 : [0,1] [5,1] ..
1. 링크 https://leetcode.com/problems/longest-common-subsequence/ Longest Common Subsequence - LeetCode Can you solve this real interview question? Longest Common Subsequence - Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0. A subsequence of a string is a new string genera leetcode.com 2. 키포인트 dp를 사용하여 현재 text1[..
1. 문제링크 https://leetcode.com/problems/k-radius-subarray-averages K Radius Subarray Averages - LeetCode Can you solve this real interview question? K Radius Subarray Averages - You are given a 0-indexed array nums of n integers, and an integer k. The k-radius average for a subarray of nums centered at some index i with the radius k is the average of all elem leetcode.com 2. 키 포인트 현재 인덱스까지 더한값을 저장..
1. 문제링크 https://leetcode.com/problems/delete-node-in-a-bst Delete Node in a BST - LeetCode Can you solve this real interview question? Delete Node in a BST - Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST. Basically, the deletion can be d leetcode.com 2. key point - Recursive로 문제를 해결할 수 있..
1. 문제링크 https://leetcode.com/problems/maximum-subsequence-score/ Maximum Subsequence Score - LeetCode Can you solve this real interview question? Maximum Subsequence Score - You are given two 0-indexed integer arrays nums1 and nums2 of equal length n and a positive integer k. You must choose a subsequence of indices from nums1 of length k. For chosen indic leetcode.com - nums1 : sum nums - nums2..
1. 문제링크 Multiply Strings - LeetCode Can you solve this real interview question? Multiply Strings - Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note: You must not use any built-in BigInteger library leetcode.com string num1, string num2의 곱셈 결과를 stoi 등의 integer 변환 함수를 사용하지 않고 풀어야하는 문제 2. key point - vector..
1. 문제링크 https://leetcode.com/problems/coin-change/ Coin Change - LeetCode Can you solve this real interview question? Coin Change - You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make leetcode.com dp는 동적 계획법인데, 이것은 복잡한 문제를 간단한 여러 개의 문제로 나누어 푸는 방법이다 dp..