전체 글

전체 글

    Programmers / Level 3 / 베스트앨범 / JS

    프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr const infoObj = {}; const playOfGenre = {}; let result = []; function solution(genres, plays) { const length = genres.length; /** * 곡별 정보들을 객체로 만드는 함수 */ const getInfo = () => { for (let i = 0; i < length; i++) { const genre = genres[i]; const play = plays[i]; infoObj[i] = {..

    CRA(Create React App) vs. Vite + React

    CRA(Create React App) Getting Started | Create React App Create React App is an officially supported way to create single-page React create-react-app.dev Create React App은 단일 페이지 React 애플리케이션을 생성하기 위해 공식적으로 지원되는 방법이다. Webpack이나 Babel 같은 도구들을 설정하거나 설치할 필요가 없다. 코드에 집중할 수 있도록 이미 설정되어있고 숨겨져 있다. App 만들기 노드 14 이상의 버전이 필요하다. 새로운 app을 만들기 위해서는, 다음 방법중 하나를 골라서 하면 된다. npx npx create-react-app..

    백준 / 그래프 / 2667번 / 단지번호붙이기 / JS

    2667번: 단지번호붙이기 과 같이 정사각형 모양의 지도가 있다. 1은 집이 있는 곳을, 0은 집이 없는 곳을 나타낸다. 철수는 이 지도를 가지고 연결된 집의 모임인 단지를 정의하고, 단지에 번호를 붙이려 한다. 여 www.acmicpc.net const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : '../input.txt'; // const filePath = process.platform === 'linux' ? '/dev/stdin' : 'BOJ/input.txt'; const input = fs.readFileSync(filePath).toString().trim().spl..

    백준 / 그래프 / 7562번 / 나이트의 이동 / JS

    7562번: 나이트의 이동 체스판 위에 한 나이트가 놓여져 있다. 나이트가 한 번에 이동할 수 있는 칸은 아래 그림에 나와있다. 나이트가 이동하려고 하는 칸이 주어진다. 나이트는 몇 번 움직이면 이 칸으로 이동할 수 www.acmicpc.net const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : '../input.txt'; // const filePath = process.platform === 'linux' ? '/dev/stdin' : 'BOJ/input.txt'; const input = fs.readFileSync(filePath).toString().trim().spl..

    백준 / 그래프 / 11724번 / 연결 요소의 개수 / JS

    11724번: 연결 요소의 개수 첫째 줄에 정점의 개수 N과 간선의 개수 M이 주어진다. (1 ≤ N ≤ 1,000, 0 ≤ M ≤ N×(N-1)/2) 둘째 줄부터 M개의 줄에 간선의 양 끝점 u와 v가 주어진다. (1 ≤ u, v ≤ N, u ≠ v) 같은 간선은 한 번만 주어 www.acmicpc.net const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : '../input.txt'; // const filePath = process.platform === 'linux' ? '/dev/stdin' : 'BOJ/input.txt'; const input = fs.readFile..

    백준 / 그래프 / 숨바꼭질 4 / JS

    13913번: 숨바꼭질 4 수빈이는 동생과 숨바꼭질을 하고 있다. 수빈이는 현재 점 N(0 ≤ N ≤ 100,000)에 있고, 동생은 점 K(0 ≤ K ≤ 100,000)에 있다. 수빈이는 걷거나 순간이동을 할 수 있다. 만약, 수빈이의 위치가 X일 www.acmicpc.net const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : '../input.txt'; // const filePath = process.platform === 'linux' ? '/dev/stdin' : 'BOJ/input.txt'; const input = fs.readFileSync(filePath).to..