Skip to content

[최민수] sprint13#246

Open
chamysj wants to merge 1 commit into
codeit-bootcamp-nodejs:algorithm-최민수from
chamysj:mission13
Open

[최민수] sprint13#246
chamysj wants to merge 1 commit into
codeit-bootcamp-nodejs:algorithm-최민수from
chamysj:mission13

Conversation

@chamysj
Copy link
Copy Markdown
Collaborator

@chamysj chamysj commented Apr 17, 2026

Mission13

미션 목표

  • 자바스크립트로 자료 구조 구현하기
  • 자바스크립트로 힙 정렬 구현하기

요구사항

  • 다음 자료 구조를 구현해 algorithm 폴더에 저장해 주세요.

링크드 리스트 (Linked List)

  • 파일 이름: LinkedList.js
  • 클래스 이름: LinkedList
  • 메서드:
    • addNode(value): 리스트의 끝에 새 노드를 추가
    • findNode(value): 주어진 값을 가지는 노드를 찾아 리턴
    • insertAfter(targetValue, newValue): 특정 값을 가진 노드 뒤에 새 노드 추가
    • removeAfter(targetValue): 특정 값을 가진 노드 뒤의 노드를 삭제

이중 링크드 리스트 (Doubly Linked List)

  • 파일 이름: DoublyLinkedList.js
  • 클래스 이름: DoublyLinkedList
  • 메서드:
    • addToHead(value): 리스트의 앞쪽에 노드 추가
    • addToTail(value): 리스트의 뒤쪽에 노드 추가
    • insertAfter(targetValue, newValue): 특정 값을 가진 노드 뒤에 새 노드 추가
    • findNode(value): 값을 가진 노드를 찾아 반환합니다.
    • removeNode(value): 특정 값을 가진 노드 삭제

큐 (Queue)

  • 파일 이름: Queue.js
  • 클래스 이름: Queue
  • 메서드:
    • enqueue(value): 큐의 맨 뒤에 값을 추가
    • dequeue(): 큐의 앞에서 값을 제거하고 그 값을 리턴
    • peek(): 큐의 앞에 있는 값을 제거하지 않고 리턴
    • isEmpty(): 큐가 비어 있는지 불린형으로 리턴

스택 (Stack)

  • 파일 이름: Stack.js
  • 클래스 이름: Stack
  • 메서드:
    • push(value): 스택의 맨 위에 값을 추가
    • pop(): 스택의 맨 위 값을 제거하고 그 값을 리턴
    • peek(): 스택의 맨 위 값을 제거하지 않고 그 값을 리턴
    • isEmpty(): 스택이 비어 있는지 불린형으로 리턴

이진 탐색 트리 (Binary Search Tree)

  • 파일 이름: BinarySearchTree.js
  • 클래스 이름: BinarySearchTree
  • 메서드:
    • insert(value): 트리에 값 추가
    • find(value): 주어진 값을 찾고 해당 노드를 리턴
    • remove(value): 트리에서 해당 값을 삭제
    • 다음 알고리즘을 JavaScript로 구현해 algorithm/sorts.js 파일에 추가로 작성해 주세요.

힙 정렬

  • 함수 이름: heapsort()
  • 숫자형 배열을 받아서 받은 배열을 정렬된 상태로 수정

@chamysj chamysj requested a review from kes2020 April 17, 2026 07:45
@chamysj chamysj self-assigned this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant