Jayden`s
[JS] 10989
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './data.txt'; const input = fs .readFileSync(path) .toString() .trim() .split('\n') .map((x) => parseInt(x)); const count = input.shift(); const solve = (input) => { const countingArr = new Array(10000 + 1).fill(0); // ๊ฐ์ฅ ํฐ ์ซ์๊ฐ 10000์ด๊ธฐ ๋๋ฌธ์ 10000์ ์ธ๋ฑ์ค๋ก ๊ฐ๋ ์นด์ดํ ๋ฐฐ์ด ์์ฑ input.forEach((num) => { countingArr[num]++; });..
![220617(๊ธ) ๋์ถ(ํนํ ์ฃผ๋ด๋) - ์๋ง๊ธ](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbbKx9P%2FbtrE1XI94l2%2FAZogTl9baPN37XnxrkQCb0%2Fimg.png)
220617(๊ธ) ๋์ถ(ํนํ ์ฃผ๋ด๋) - ์๋ง๊ธ
๋นํฌ(๋น๋ด์ ํฌ์)์กฑ์ด๋ ๋ค์ ๋ฌด๋ฆฌํ ์ฃผ๋ด๋(์ฃผํ๋ด๋ณด๋์ถ)๋ฅผ ํตํด ๋ถ๋์ฐ์ ๊ตฌํ ์ฌ๋๋ค์๊ฒ๋ ์ง๊ธ์ด ๊ต์ฅํ ํ๋ ์๊ธฐ ์ ๋ฌธ์ ๋ณผ ๋, ๊ผญ ์ด 4์ปท ๋งํ๋ ์ฑ๊ฒจ ๋ณธ๋ค. ์ค๋์ ํนํ๋ ์์ฆ ์ํฉ์ ์ ํํํ์๊ณ ์๋ฟ์์ ๋งํ๋ฅผ ์คํฌ๋ฉํด๋ณธ๋ค. ใ ใ ใ
![220616(๋ชฉ) ๋ฒค์ฒ์
๊ณ, ์ฑ์ฅ์ '์์กด'](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcMbq19%2FbtrESEdKXft%2FVq3THwdcQTJP2VgJRYR9u1%2Fimg.png)
220616(๋ชฉ) ๋ฒค์ฒ์ ๊ณ, ์ฑ์ฅ์ '์์กด'
์คํํธ์ ํฌ์ ํนํ๊ธฐ๋ฅผ ์๋ฆฌ์ฆ๋ก ๋ค๋ฃฐ๋งํผ ํ์ฌ์ ํฌ์ ์ํฉ์ด ์ข์ง ์๋ค. ์ํฉ์ ๋ ํ์ ํ๋ ๋๋ ๋ด ํ ๊ฒ๋ค์ ์ํ๋ฉด์ ์ค๋นํด๋์๊ฐ๋ฉด ๋๋ค. ์ธ์์ ํ๋ฆ์ ๋ณด๋ ๊ฒ๋ ์ค์ํ๊ณ ๋๋ฅผ ๋ฏฟ๊ณ ๊ธธ์ ๊ฑท๋ ๊ฒ๋ ์ค์ํ๋ค.
[JS] 2750 - Bubble sort, Selection sort
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './data.txt'; const input = fs .readFileSync(path) .toString() .trim() .split('\n') .map((x) => parseInt(x)); const count = input.shift(); const solveBubble = (input) => { for (let i = input.length - 1; i > 0; i--) { for (let j = 0; j input[j + 1]) { let temp = input[j + 1]; input[j + ..
![220615(์) ์คํํธ์
'ํฌ์๋ณด๋ฆฟ๊ณ ๊ฐ'](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F2lpbN%2FbtrEQfXIJz3%2FejhAiUeDU0FJPMfTnwpIPk%2Fimg.png)
220615(์) ์คํํธ์ 'ํฌ์๋ณด๋ฆฟ๊ณ ๊ฐ'
๋ด๊ฐ ๋์๊ฐ๊ณ ์ ํ๋ ๊ธธ์ ๋ํ ๋ฏฟ์์ ์์ง ์๋, ํ์ค์ ์ง์ํ ์ ์๋๋ก ํ์