Skip to content

flamozzi/JS_Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

JS Algorithm Template by flamozzi

Info

  • μ½”λ”©ν…ŒμŠ€νŠΈ λŒ€λΉ„ 및 ν•™μŠ΅μš© JS μ•Œκ³ λ¦¬μ¦˜ 정리 ν…œν”Œλ¦Ώμž…λ‹ˆλ‹€.
  • λ‚΄μš© 및 파일 νŠΈλ¦¬λŠ” κ³„μ†ν•΄μ„œ μ—…λ°μ΄νŠΈ λ©λ‹ˆλ‹€.
  • 폴더 λͺ…κ³Ό λ™μΌν•œ λͺ…μ˜ js νŒŒμΌμ€ μ „λ°˜μ μΈ λ‚΄μš©μ •λ¦¬μš© νŒŒμΌμž…λ‹ˆλ‹€.
  • BJ_N 은 λ°±μ€€μ˜ N번째 문제λ₯Ό λœ»ν•©λ‹ˆλ‹€.
  • 각 문제 ν΄λ”μ˜ input.txt에 μž…λ ₯ μ˜ˆμ‹œ ν…μŠ€νŠΈκ°€ μœ„μΉ˜ν•©λ‹ˆλ‹€.
/*
const filePath = process.platform === 'linux' ? '/dev/stdin' : '/input.txt' μ½”λ“œλ₯Ό 톡해 λ°±μ€€ 및 vscodeμ—μ„œ μ •μƒμ μœΌλ‘œ μž…λ ₯ νŒŒμΌμ„ λ°›μ•„μ˜¬ 수 μžˆλ„λ‘ 쑰건을 λ‹¬μ•„μ€λ‹ˆλ‹€.
*/

const fs = require('fs')
const filePath = process.platform === 'linux' ? '/dev/stdin' : '/input.txt'
let input = fs
  .readFileSync(__dirname + filePath)
  .toString()
  .split('\n')

... 이후 둜직 μ½”λ“œ

File Tree

πŸ“¦JS_Template
 ┣ πŸ“‚01.Stack
 ┃ β”— πŸ“œstack.js
 ┣ πŸ“‚02.Queue
 ┃ β”— πŸ“œqueue.js
 ┣ πŸ“‚03.Heap
 ┃ β”— πŸ“œheap.js
 ┣ πŸ“‚04.Graph
 ┃ β”— πŸ“œgraph.js
 ┣ πŸ“‚05.Sorting
 ┃ ┣ πŸ“‚problems
 ┃ ┃ ┣ πŸ“‚BJ_10814
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_11004
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_11650
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_1181
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_1427
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_18870
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_2750
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ β”— πŸ“‚BJ_2752
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ β”— πŸ“œsorting.js
 ┣ πŸ“‚06.Greedy
 ┃ ┣ πŸ“‚problems
 ┃ ┃ ┣ πŸ“‚BJ_11047
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_11399
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_1541
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ ┣ πŸ“‚BJ_16953
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ ┃ β”— πŸ“‚BJ_2839
 ┃ ┃ ┃ ┣ πŸ“œindex.js
 ┃ ┃ ┃ β”— πŸ“œinput.txt
 ┃ β”— πŸ“œgreedy.js
 β”— πŸ“œREADME.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published