일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- ELECTRON
- react-native-dotenv
- 이미지 데이터 타입
- camera permission
- ffi-napi
- camera access
- dvh
- github pdf
- adb pair
- animation
- github 100mb
- 티스토리 성능
- Recoil
- electron-packager
- github lfs
- augmentedDevice
- react-native
- nextjs
- device in use
- rolldown
- adb connect
- vercel git lfs
- npm package
- custom printing
- silent printing
- html
- Failed to compiled
- Each child in a list should have a unique "key" prop.
- Git
- Can't resolve
- Today
- Total
목록전체 글 (337)
Bleeding edge
코딩테스트 문제를 풀다보면, new Map()이라는 생성자를 많이 사용하게된다. 문제를 풀다보면 이게 됬다 저게 안됬다 하는 경우가 상당히 많았었는데 오늘 문제를 풀면서 알게된 것이 있었다. map에는 저장하는 방법이 두가지가 있다. 1. set을 이용한 저장 방법 map.set(1,1) 2. map의 keyd에 저장하는 방법 map[2] = 2 위의 두가지 방법은 console로 표시를한다면, Map(1) { 1 => 1, '2': 2 } 이렇게 나온다. map으로써 저장된 1과, object로 저장된 2. 1로 저장한 방법같은 경우에는, 숫자로 저장되었고 2로 저장한방법은 문자열로 저장이 되었다. 두 저장방법에 따라서 또 사용할 수 있는 것도 다르다. 만일 1번방법으로 저장한 경우에는 Array.fr..
https://leetcode.com/problems/find-players-with-zero-or-one-losses/ Find Players With Zero or One Losses - 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. hash map과 return 할 result를 만든다 const hash = {} const result = [[], []] 2. 주어진 matches에서 갯수를 카운팅한다 matches.map(([win, lose]) ..
https://leetcode.com/problems/divide-array-into-equal-pairs/ Divide Array Into Equal Pairs - 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. 문제는 간단하다 2개의 짝이 떨어지는 경우를풀이를 해야하기 때문에 sort를 했다. let answer = nums.sort((a, b) => a - b)..
https://leetcode.com/problems/capitalize-the-title/ Capitalize the Title - 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. result로 title을 스플릿한다. answer을 ""로 선언한다. let result = title.split(' ') let answer = "" 2.result를 기준으로 for문을 만든다. for (l..
https://leetcode.com/problems/minimum-time-to-make-rope-colorful/ Minimum Time to Make Rope Colorful - 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, reduce, filter를 자주쓰다보니 block scope에 대한 공부가 잘되는 것 같다. 1. 이 문제는 글자에서 다음글자가 같은지 다른지를 체크해야하고, 겹치는 글자가 2개이상인지 확인해야한다 따라서, 글자가 들어..
https://leetcode.com/problems/find-the-k-beauty-of-a-number/ Find the K-Beauty of a Number - 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 주어진 k의 길이만큼 nums를 자르고, 자르고 나온 숫자가 x라고 했을때 x가 num로 나누었을 때 0인 경우의 수를 세는 문제이다. 아마 풀이를 보는게 더 이해가 빠를것 같다. 1. 0인 ansewr와 array인 return을 선언한다. 그리고 n..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/dLOgCM/btrFAQD3roS/IHTkMNTGDiwu9JuA3SgepK/img.png)
https://leetcode.com/problems/height-checker/ Height Checker - 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 문제풀이는 총 3번했다. 1. sort를 두번 써서 2. 1번에서 푼문제를 살짝 수정 3. 2번에서 효율성 개선 1. sort를 두번 썼을 때는 index가 같은 숫자가 많은경우, 오답이 처리되서 좀 더 단순하게 풀기 위해 다시 풀었다. 2번풀이 1. 원래의 본문과 차이가 있으면, count를 해줄 ans..
https://leetcode.com/problems/apply-discount-to-prices/ Apply Discount to Prices - 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.주어진 sentence를 " "로 분리합니다. 잘보면 $12a 이런 문자는 나눌 수 없는 것을 볼 수 있습니다. 즉 $숫자 단위로 ..
https://leetcode.com/problems/day-of-the-week/ Day of the Week - 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 자바스크립트의 new Date를 이용하여, 요일을 얻고 문제에 주어진 array를 이용하여 요일을 return 하는 문제이다. 단지 문제를 1회차 풀이에서 틀렸었는데 주의를 해야하는 것이 new Date함수이다. new Date함수의 모양을 잘봐보자! new Date(year, month index, ..