일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 티스토리 성능
- ffi-napi
- react-native-dotenv
- Can't resolve
- Failed to compiled
- Git
- nextjs
- rolldown
- electron-packager
- 이미지 데이터 타입
- react-native
- camera access
- device in use
- Recoil
- adb connect
- pnpm
- github 100mb
- vercel git lfs
- github pdf
- augmentedDevice
- camera permission
- dvh
- ELECTRON
- github lfs
- animation
- Each child in a list should have a unique "key" prop.
- custom printing
- adb pair
- silent printing
- html
- Today
- Total
목록코딩테스트 공부 (78)
Bleeding edge
https://leetcode.com/problems/destroying-asteroids/ Destroying Asteroids - LeetCode 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 개인적으로는 easy로 문제 난이도가 아닌가 싶다. 아까 풀었던 easy문제가 더 어려웠던거 같다. 이 문제는, 주어진 asteroids를 순서대로 배치하고 mass에 부딫히는데, mass가 asteroids에 충돌할 때마다 asteroids만큼 mass가 커진다. 이때 mass가 막..
https://leetcode.com/problems/kth-distinct-string-in-an-array/submissions/ Kth Distinct String in an Array - LeetCode 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 이 문제풀이를 할 때 목표는, 가독성을 높이기 위해 function으로 많이 쪼개려고 노력했다! 1. 주어진 arr에 대하여, 각 arr들의 성분들이 가지고 있는 갯수를 세기 위하여 new map을 만들고, count를 시키..
https://leetcode.com/problems/day-of-the-year/submissions/ Day of the Year - LeetCode 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 주어진 년 월 일을 통해서 오늘이 그 해의 몇 번째 일인지 계산하는 문제이다. 이 문제에서 주의해야할 사항은 그 해가 윤년인가? 1. 문제를 먼저 풀기 위해서 주어진 date를 split 해야 했다. const dateInfo = date.split("-") 2. 윤년인지 계산을 ..
https://leetcode.com/problems/sender-with-largest-word-count/ Sender With Largest Word Count - LeetCode 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 이 문제에서는, map과 여러 조건의 sort를 사용하는 문제이다. 1. 먼저 map을 한개 만들어둔다. 이렇게 key를 활용하는 경우에는 map이 효율적이다. const map = new Map() 2. 주어진 senders를 기준으로 루프를 만들..
https://leetcode.com/problems/pascals-triangle/ Pascal's Triangle - LeetCode 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 문제 풀이는 그림대로 풀이하면된다 1.모든 삼각형에 1을 처음에 넣는다 2. 위에 삼각형의 좌 우에 해당하는 칸을 더하면서 계속 내려간다! 단지 차이가 있다고 하면, 자바스크립트의 모양은 저렇게 삼각형은 아니기에 모양을 살짝 다른식으로 생각하면 풀이하기가 쉽다. 문제풀이 1. return 할 ar..
1회차 풀이에서는 아주 큰 숫자가 대입되서 Wrong!이 나왔다. 문제는 아주 많은 숫자가 들어올 수 있다고 생각하고 BigInt를 사용하여 문제를 풀이하였다. 1. 주어진 문자를 join으로 문자로 만든다 주어진 arr가 [1,2,3]이라고 한다면 123이 된다. digits.join("") 2. 1에서 구한 식을 BigInt로 감싼다. 이 때 결과값은 123n이 된다 BigInt(digits.join("")) 3. 2에서 구한식에 BigInt(1)을 더하고, 문자로 바꾼다. 이유는, BigInt는 바로 Split이 안되기 떄문이다. (BigInt(digits.join("")) + BigInt(1)).toString() 4. 3에서 구한 것을 split한 후, 각 문자에 대하여 map을 취하여 숫자로 ..
https://leetcode.com/problems/average-waiting-time/ Average Waiting Time - LeetCode 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 음식점에서 평균적으로 얼마나 손님들이 시간을 소요하는지 문제를 구하는 문제이다. 문제에는, 손님들이 온 시간과 먹은 시간이 기록된 리스트가 주어져 있다. 문제풀이 1. 현재 시간을 선언한다. 이때 손님이 온 시간을 모르니 0으로 선언한다. 2. 전체 시간을 선언한다. 시간이 소요될 때..
https://leetcode.com/problems/reverse-prefix-of-word/submissions/ Reverse Prefix of Word - LeetCode 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 풀이 1. 주어진 word에 ch가 없으면 return ch if (!word.includes(ch)) return word 2. word안 에서의 ch의 index를 구한다 const chIndex = word.indexOf(ch) 3. 0부터 chInd..
https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/ Replace Elements with Greatest Element on Right Side - LeetCode 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 주어진 arr에서, 본인의 오른쪽에 위치한 숫자중 가장 큰 숫자를 push하는 문제이다. arr의 길이가 n개라면 return한 값의 arr도 n개가 나와야한다. 주의할 ..