[강희성] Sprint13#180
Open
hiiisiii wants to merge 1 commit into
Hidden character warning
The head ref may contain hidden characters: "algorithm-\uac15\ud76c\uc131"
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
미션 목표
요구사항
스프린트 12 정렬 알고리즘
선택 정렬 (Selection Sort) -
selectionSort(arr)삽입 정렬 (Insertion Sort) -
insertionSort(arr)병합 정렬 (Merge Sort) -
mergeSort(arr)퀵 정렬 (Quick Sort) -
quickSort(arr)스프린트 13 자료구조 및 알고리즘
링크드 리스트 (Linked List)
algorithm/LinkedList.jsLinkedListaddNode(),findNode(),insertAfter(),removeAfter()이중 링크드 리스트 (Doubly Linked List)
algorithm/DoublyLinkedList.jsDoublyLinkedListaddToHead(),addToTail(),insertAfter(),findNode(),removeNode()큐 (Queue)
algorithm/Queue.jsQueueenqueue(),dequeue(),peek(),isEmpty()스택 (Stack)
algorithm/Stack.jsStackpush(),pop(),peek(),isEmpty()이진 탐색 트리 (Binary Search Tree)
algorithm/BinarySearchTree.jsBinarySearchTreeinsert(),find(),remove()힙 정렬 (Heap Sort)
algorithm/sorts.jsheapsort(arr)주요 변경사항
algorithm/sorts.js에 정렬 알고리즘 5종 구현selectionSortinsertionSortmergeSortquickSortheapsortalgorithm폴더에 기본 자료구조 구현 파일 추가LinkedList.jsDoublyLinkedList.jsQueue.jsStack.jsBinarySearchTree.js각 파일에서 CommonJS 방식으로 모듈 export 처리
각 파일 하단에
if (require.main === module)조건을 사용해 독립 실행 테스트 코드 작성mergeSort는 요구사항에 맞게 원본 배열을 유지하고 새 정렬 배열을 반환하도록 구현나머지 정렬 함수는 요구사항에 맞게 원본 배열을 직접 수정하도록 구현
테스트
아래 명령어로 각 파일의 동작을 확인했습니다.
스크린샷
링크드 리스트 (Linked List)
이중 링크드 리스트 (Doubly Linked List)
큐 (Queue)
스택 (Stack)
이진 탐색 트리 (Binary Search Tree)
힙 정렬 (Heap Sort)