Coding Test203 [Programmers] (2022 KAKAO BLIND RECRUITMENT) Lv 2. k진수에서 소수 개수 구하기 https://school.programmers.co.kr/learn/courses/30/lessons/92335 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(n, k) { const isPrime = (N) => { if (["1", ""].includes(N)) return false; for (let i = 2; i isPrime(e)).length; } GitHub : https://github.com/developeSHG/Algorithm-Baekjoon_Programmers/tree/main/%ED%94%84%.. 2023. 2. 16. [Programmers] (2018 KAKAO BLIND RECRUITMENT) Lv 2. [1차] 뉴스 클러스터링 https://school.programmers.co.kr/learn/courses/30/lessons/17677 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(str1, str2) { // 숫자, 공백 제거 // 특수문자, 괄호, 공백 모두 제거 - 점은 제거 안함 const reg1 = /[0-9 ]/gim, reg2 = /[`.,~!@#$%^&*()_|+\-=?;:'"\{\}\[\]\\\/ ]/gim; const str = [str1, str2]; for (const i in str) { str[i] = [...str.. 2023. 2. 16. [Programmers] (깊이/너비 우선 탐색[DFS/BFS]) Lv 2. 타겟 넘버 https://school.programmers.co.kr/learn/courses/30/lessons/43165 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(numbers, target) { var answer = 0; const dfs = (idx, sum) => { if (idx >= numbers.length) { if (target === sum) answer++; return; } dfs(idx + 1, sum + numbers[idx]); dfs(idx + 1, sum - numbers[idx]); }; df.. 2023. 2. 15. [Programmers] (스택/큐) Lv 2. 프린터 https://school.programmers.co.kr/learn/courses/30/lessons/42587 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(priorities, location) { const recursive = (res, data) => { if (!data.some((e, i) => data[0] < e && 0 < i)) { if (0 == location) return res.length + 1; res.push(data[0]); --location; } else { location = (lo.. 2023. 2. 14. [Programmers] (스택/큐) Lv 2. 기능개발 https://school.programmers.co.kr/learn/courses/30/lessons/42586 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr const solution = (progresses, speeds) => { return progresses.map((el, idx) => Math.ceil((100 - el) / speeds[idx])).reduce((queue, el) => { (queue.length = el) ? queue[q.. 2023. 2. 13. [Programmers] (월간 코드 챌린지 시즌3) Lv 2. n^2 배열 자르기 https://school.programmers.co.kr/learn/courses/30/lessons/87390 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(n, left, right) { return Array.from({ length: right - left + 1 }, (undefined, idx) => { idx += left; return Math.max(parseInt(idx / n) + 1, idx % n + 1); }); } GitHub : https://github.com/developeSHG/Algor.. 2023. 2. 10. [Programmers] (2019 카카오 개발자 겨울 인턴십) Lv 2. 튜플 https://school.programmers.co.kr/learn/courses/30/lessons/64065 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(s) { s = s.replace(/{/g, "").replace(/},/g, " ").replace(/}/g, "").split(" ").sort((a, b) => a.length - b.length); return s.reduce((acc, el) => { el = el.split(","); if (acc.length < el.length) { acc.forEa.. 2023. 2. 9. [Programmers] (해시) Lv 2. 의상 https://school.programmers.co.kr/learn/courses/30/lessons/42578 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(clothes) { var answer = 1; const map = new Map(); clothes.forEach((pair) => map.set(pair[1], map.get(pair[1]) ? map.get(pair[1]) + 1 : 1)); for (const [key, value] of map.entries()) answer *= (value + 1); .. 2023. 2. 7. [Programmers] Lv 2. 행렬의 곱셈 https://school.programmers.co.kr/learn/courses/30/lessons/12949 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(arr1, arr2) { return arr1.map((row) => { return arr2[0].map((_, col) => { return row.reduce((acc, e, idx) => acc + e * arr2[idx][col], 0); }); }); } GitHub : https://github.com/developeSHG/Algorithm-Baekjo.. 2023. 2. 7. [LeetCode] (Strings) Lv Easy. First Unique Character in a String https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/881/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com /** * @param {string} s * @return {number} */ var firstUniqChar = function (s) { .. 2023. 2. 6. 이전 1 ··· 12 13 14 15 16 17 18 ··· 21 다음