Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hannut91 committed Aug 27, 2023
0 parents commit 828ea80
Show file tree
Hide file tree
Showing 31 changed files with 8,385 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
env: {
es2021: true,
node: true,
jest: true,
},
extends: 'airbnb-base',
overrides: [
{
env: {
node: true,
},
files: [
'.eslintrc.{js,cjs}',
],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'operator-assignment': 'off',
'max-classes-per-file': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-param-reassign': 'off',
'consistent-return': 'off',
},
};
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-22.04

timeout-minutes: 1

steps:
- uses: actions/checkout@v3
- name: Node.js setup
uses: actions/setup-node@v3
with:
node-version: 18.16.1
cache: 'npm'
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependecies
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
run: npm ci
- run: npm test
- run: npm run lint
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# intellij
.idea/*

# NPM Cache files
.npm

# nodejs
node_modules/

# VS Code
.vscode/*

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# macOS
.DS_Store
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 자료구조와 알고리즘 4주차 과제

## 학습 목표

- 자료형 마다 탐색이 어떻게 달라지는지 이해합니다.
- 심볼 테이블이 무엇이고 어떻게 사용하는지 이해합니다.
- 이진 탐색이 무엇이고 어떻게 사용하는지 이해합니다.
- 이진 탐색 트리가 무엇이고 어떻게 사용하는지 이해합니다.
- 균형 탐색 트리가 무엇이고 어떻게 사용하는지 이해합니다.
- 해시 테이블이 무엇이고 어떻게 사용하는지 이해합니다.

## 과제

- 배열로 구현하는 비순차 심볼 테이블 구현하기
- 이진 탐색 순차 심볼 테이블에 메서드 추가하기
- 이진 탐색 트리 순차 심볼 테이블에 높이 구하는 메서드 추가하기
- 레드 블랙 트리 값 추가하는 과정 그리기
- 개별 체이닝 해싱 테이블, 선형 탐지 해싱 테이블 구현하기

## 패키지 설치

```bash
$ npm ci
```

## 제한조건

- 모든 테스트를 통과해야 합니다.
- ESLint를 통과해야 합니다.
- 스스로 문제 해결법을 떠올리기 위해 Copilot은 사용하지 말아주세요.

## 테스트 실행 방법

```bash
# 의존성 설치
$ npm ci
# 테스트 실행
$ npm test
# 테스트 실행 (watch 모드)
$ npm run watch
# 특정 문제만 테스트 실행
$ npm run watch -- problem-1
```
78 changes: 78 additions & 0 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1692777240792" clover="3.2.0">
<project timestamp="1692777240792" name="All files">
<metrics statements="69" coveredstatements="69" conditionals="42" coveredconditionals="42" methods="15" coveredmethods="15" elements="126" coveredelements="126" complexity="0" loc="69" ncloc="69" packages="1" files="1" classes="1"/>
<file name="SymbolTable.js" path="/Users/yunseok/Development/codesoom/dsa/dsa-week4-assignment-1/problem-2/SymbolTable.js">
<metrics statements="69" coveredstatements="69" conditionals="42" coveredconditionals="42" methods="15" coveredmethods="15"/>
<line num="7" count="24" type="stmt"/>
<line num="8" count="24" type="stmt"/>
<line num="9" count="24" type="stmt"/>
<line num="13" count="8" type="stmt"/>
<line num="17" count="11" type="cond" truecount="2" falsecount="0"/>
<line num="18" count="1" type="stmt"/>
<line num="21" count="10" type="stmt"/>
<line num="22" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="23" count="1" type="stmt"/>
<line num="26" count="9" type="cond" truecount="2" falsecount="0"/>
<line num="27" count="3" type="stmt"/>
<line num="30" count="6" type="stmt"/>
<line num="34" count="44" type="stmt"/>
<line num="35" count="44" type="cond" truecount="4" falsecount="0"/>
<line num="36" count="2" type="stmt"/>
<line num="37" count="2" type="stmt"/>
<line num="40" count="42" type="stmt"/>
<line num="41" count="7" type="stmt"/>
<line num="42" count="7" type="stmt"/>
<line num="45" count="42" type="stmt"/>
<line num="46" count="42" type="stmt"/>
<line num="47" count="42" type="stmt"/>
<line num="51" count="4" type="stmt"/>
<line num="52" count="4" type="cond" truecount="4" falsecount="0"/>
<line num="53" count="1" type="stmt"/>
<line num="56" count="3" type="stmt"/>
<line num="57" count="1" type="stmt"/>
<line num="58" count="1" type="stmt"/>
<line num="61" count="3" type="stmt"/>
<line num="65" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="66" count="1" type="stmt"/>
<line num="69" count="1" type="stmt"/>
<line num="70" count="1" type="cond" truecount="2" falsecount="0"/>
<line num="74" count="172" type="cond" truecount="2" falsecount="0"/>
<line num="75" count="61" type="stmt"/>
<line num="78" count="111" type="stmt"/>
<line num="79" count="111" type="cond" truecount="2" falsecount="0"/>
<line num="80" count="29" type="stmt"/>
<line num="81" count="82" type="cond" truecount="2" falsecount="0"/>
<line num="82" count="59" type="stmt"/>
<line num="84" count="23" type="stmt"/>
<line num="89" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="90" count="1" type="stmt"/>
<line num="93" count="1" type="stmt"/>
<line num="97" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="98" count="1" type="stmt"/>
<line num="101" count="1" type="stmt"/>
<line num="105" count="1" type="stmt"/>
<line num="109" count="8" type="cond" truecount="2" falsecount="0"/>
<line num="110" count="1" type="stmt"/>
<line num="113" count="7" type="stmt"/>
<line num="114" count="7" type="cond" truecount="4" falsecount="0"/>
<line num="115" count="3" type="stmt"/>
<line num="118" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="122" count="8" type="cond" truecount="2" falsecount="0"/>
<line num="123" count="1" type="stmt"/>
<line num="126" count="7" type="stmt"/>
<line num="127" count="7" type="cond" truecount="2" falsecount="0"/>
<line num="128" count="1" type="stmt"/>
<line num="131" count="6" type="stmt"/>
<line num="135" count="35" type="stmt"/>
<line num="139" count="1" type="stmt"/>
<line num="143" count="2" type="stmt"/>
<line num="145" count="2" type="stmt"/>
<line num="146" count="2" type="stmt"/>
<line num="147" count="2" type="stmt"/>
<line num="148" count="5" type="stmt"/>
<line num="151" count="2" type="stmt"/>
<line num="155" count="1" type="stmt"/>
</file>
</project>
</coverage>
Loading

0 comments on commit 828ea80

Please sign in to comment.