본문 바로가기

매일매일 코딩테스트19

모의고사 모의고사 링크-- https://school.programmers.co.kr/learn/courses/30/lessons/42840 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 나의풀이-- function solution(answers) { const first = [1, 2, 3, 4, 5]; const second = [2, 1, 2, 3, 2, 4, 2, 5]; const third = [3, 3, 1, 1, 2, 2, 4, 4, 5, 5]; const count = [0, 0, 0]; for (let i = 0; i < answers.length.. 2023. 6. 22.
로또의 최고 순위와 최저 순위 The Highest and Lowest Lotto Prizes 링크-- https://school.programmers.co.kr/learn/courses/30/lessons/77484 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 나의풀이-- function solution(lottos, win_nums) { var Tiers = [6,6,5, 4, 3, 2, 1]; var answer = []; lottos.forEach((a) => { if (win_nums.includes(a)) { answer.push(a); } }); var zero = lo.. 2023. 6. 22.
두 개 뽑아서 더하기 두 개 뽑아서 더하기 링크-- https://school.programmers.co.kr/learn/courses/30/lessons/68644 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 나의풀이-- function solution(numbers) { var answer = []; for (var i = 0; i .. 2023. 6. 22.
같은 숫자는 싫어 I Don't Like Identical Number 링크-- https://school.programmers.co.kr/learn/courses/30/lessons/12906 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 나의풀이-- function solution(arr){ const filteredArr = arr.filter((num, index) => { return num !== arr[index + 1]; }); return filteredArr } 2023. 6. 22.