https://github.com/ssi02014/algorithm-coding-test
๐์๊ณ ๋ฆฌ์ฆ, ์๋ฃ๊ตฌ์กฐ, ์ฝ๋ฉํ
์คํธ ๊ณต๋ถ ์ ์ฅ์
https://github.com/ssi02014/algorithm-coding-test
algorithms javascript structure
Last synced: 3 months ago
JSON representation
๐์๊ณ ๋ฆฌ์ฆ, ์๋ฃ๊ตฌ์กฐ, ์ฝ๋ฉํ ์คํธ ๊ณต๋ถ ์ ์ฅ์
- Host: GitHub
- URL: https://github.com/ssi02014/algorithm-coding-test
- Owner: ssi02014
- Created: 2020-12-25T13:52:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-07T16:50:57.000Z (6 months ago)
- Last Synced: 2025-05-29T16:15:21.307Z (5 months ago)
- Topics: algorithms, javascript, structure
- Language: JavaScript
- Homepage:
- Size: 681 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ป Algorithm-Coding-Test
### ์๊ณ ๋ฆฌ์ฆ/์๋ฃ๊ตฌ์กฐ ๋ฐ ์ฝ๋ฉํ ์คํธ ๊ณต๋ถ ์ ์ฅ์
### ๋งค์ผ 1~2๋ฌธ์ ๊ผญ ํ๊ณ commit ํ๊ธฐ! ๐ค
### ๐ Commit Message Convention
1. ๋ฐฑ์ค: Add(baekjoon): ~~~ '
2. ํ๋ก๊ทธ๋๋จธ์ค: Add(Level1): ~~~ '
3. ์๊ณ ๋ฆฌ์ฆ: Add(greedy): ~~~ '
4. ๊ตฌ๋ฆ: Add(goorm): ~~~ '
## ๐ฅ ์ฝ๋ฉํ ์คํธ ๋ฌธ์ ์ฌ์ดํธ
- [programmers] : (https://programmers.co.kr/)
- [๋ฐฑ์ค] : (https://www.acmicpc.net/)
## โจ ์๊ณ ๋ฆฌ์ฆ ๊ณต๋ถ
1. [์ด๊ฒ์ด ์ฝ๋ฉํ ์ค๋ค-with ํ์ด์ฌ]
- Greedy(๊ทธ๋ฆฌ๋)
- Implement(๊ตฌํ)
- DFS, BFS
- Recursion(์ฌ๊ท)
- Sort(์ ๋ ฌ)
- Binary-Search(์ด์งํ์)
## ๐ ๋ฐฑ์ค) node.js ์ ๋ ฅ๊ฐ ๋ฐ๊ธฐ
```javascript
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});//์ ์ญ ๋ณ์
let input = [];function solution() {
//ํ์ด ์ฝ๋...
}rl.on("line", function (line) {
input.push(line);
}).on("close", function () {
//์ ๋ ฅ๊ฐ ๋ฐ๋ ์ฝ๋...solution();
})
```
## ๐ ํ๋ก๊ทธ๋๋จธ์ค) ํจ์ํ ์ฝ๋ฉํ ์คํธ
### ex) Level1 - 3์ง๋ฒ ๋ค์ง๊ธฐ
```javascript
function solution(n) {
const reverseTernary = n.toString(3).split('').reverse();
let answer = 0;
let sum ='';
reverseTernary.forEach(n => sum += n);
return answer = parseInt(sum, 3);
}
```