JavaScript에서 Set과 Array는 언제 사용해야 할까?
백준 숫자 카드(10815) 문제를 풀다가 시간 초과 문제를 겪게 되었다. 내가 작성한 코드는 다음과 같다.
const N = Number(input[0])
const setting = input[1].split(' ')
const M = Number(input[2])
const finding = input[3].split(' ')
const result = finding.map((card) => setting.includes(card) ? ...
yeonsu.hashnode.dev2 min read