An open API service indexing awesome lists of open source software.

https://github.com/ssi02014/algorithm-coding-test

๐Ÿ“ƒ์•Œ๊ณ ๋ฆฌ์ฆ˜, ์ž๋ฃŒ๊ตฌ์กฐ, ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ๊ณต๋ถ€ ์ €์žฅ์†Œ
https://github.com/ssi02014/algorithm-coding-test

algorithms javascript structure

Last synced: 3 months ago
JSON representation

๐Ÿ“ƒ์•Œ๊ณ ๋ฆฌ์ฆ˜, ์ž๋ฃŒ๊ตฌ์กฐ, ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ๊ณต๋ถ€ ์ €์žฅ์†Œ

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);
}
```