Skip to content

[정현준] sprint13#241

Open
stuhk56-hash wants to merge 7 commits into
codeit-bootcamp-nodejs:mainfrom
stuhk56-hash:algorithm-정현준

Hidden character warning

The head ref may contain hidden characters: "algorithm-\uc815\ud604\uc900"
Open

[정현준] sprint13#241
stuhk56-hash wants to merge 7 commits into
codeit-bootcamp-nodejs:mainfrom
stuhk56-hash:algorithm-정현준

Conversation

@stuhk56-hash
Copy link
Copy Markdown
Collaborator

미션 목표

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

요구사항

  • 다음 자료 구조를 구현해 algorithm 폴더에 저장해 주세요.
  1. 링크드 리스트 (Linked List)
  • 파일 이름: LinkedList.js
  • 클래스 이름: LinkedList
    메서드:
  • addNode(value): 리스트의 끝에 새 노드를 추가
  • findNode(value): 주어진 값을 가지는 노드를 찾아 리턴
  • insertAfter(targetValue, newValue): 특정 값을 가진 노드 뒤에 새 노드 추가
  • removeAfter(targetValue): 특정 값을 가진 노드 뒤의 노드를 삭제
  1. 이중 링크드 리스트 (Doubly Linked List)
  • 파일 이름: DoublyLinkedList.js
  • 클래스 이름: DoublyLinkedList
    메서드:
  • addToHead(value): 리스트의 앞쪽에 노드 추가
  • addToTail(value): 리스트의 뒤쪽에 노드 추가
  • insertAfter(targetValue, newValue): 특정 값을 가진 노드 뒤에 새 노드 추가
  • findNode(value): 값을 가진 노드를 찾아 반환합니다.
  • removeNode(value): 특정 값을 가진 노드 삭제
  1. 큐 (Queue)
  • 파일 이름: Queue.js
  • 클래스 이름: Queue
    메서드:
  • enqueue(value): 큐의 맨 뒤에 값을 추가
  • dequeue(): 큐의 앞에서 값을 제거하고 그 값을 리턴
  • peek(): 큐의 앞에 있는 값을 제거하지 않고 리턴
  • isEmpty(): 큐가 비어 있는지 불린형으로 리턴
  1. 스택 (Stack)
  • 파일 이름: Stack.js
  • 클래스 이름: Stack
    메서드:
  • push(value): 스택의 맨 위에 값을 추가
  • pop(): 스택의 맨 위 값을 제거하고 그 값을 리턴
  • peek(): 스택의 맨 위 값을 제거하지 않고 그 값을 리턴
  • isEmpty(): 스택이 비어 있는지 불린형으로 리턴
  1. 이진 탐색 트리 (Binary Search Tree)
  • 파일 이름: BinarySearchTree.js

  • 클래스 이름: BinarySearchTree
    메서드:

  • insert(value): 트리에 값 추가

  • find(value): 주어진 값을 찾고 해당 노드를 리턴

  • remove(value): 트리에서 해당 값을 삭제

  • 다음 알고리즘을 JavaScript로 구현해 algorithm
    sorts.js 파일에 추가로 작성해 주세요.

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

주요 변경사항

스크린샷

image image image image image image

멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

@stuhk56-hash stuhk56-hash added the 순한맛🐑 마음이 많이 여립니다.. label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

순한맛🐑 마음이 많이 여립니다..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant