Skip to content

[Data Structure] 이진 탐색 트리 구현 - #179

Merged
sh0723 merged 1 commit into
mainfrom
implement-BST
Jul 20, 2026
Merged

[Data Structure] 이진 탐색 트리 구현#179
sh0723 merged 1 commit into
mainfrom
implement-BST

Conversation

@sh0723

@sh0723 sh0723 commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • BinarySearchTree 클래스로 포인터 기반 BST를 직접 구현했습니다.
  • insert, erase, containsmin, max, height, clear를 지원합니다.
  • leaf 노드, 자식 하나인 노드, 자식 둘인 노드 삭제 케이스를 처리합니다.
  • 중위, 전위, 후위 순회 출력으로 트리 상태를 확인할 수 있게 했습니다.

Test

  • c++ -std=c++17 -Wall -Wextra -pedantic src/data_structure_implement/tree/bst.cpp -o /tmp/bst_check
  • /tmp/bst_check 실행 확인
  • 주요 출력 확인: size: 9, height: 3, min: 3, max: 20, 삭제 후 size: 6, empty after clear: true

Closes #178

@sh0723
sh0723 merged commit efec9c5 into main Jul 20, 2026
1 check passed
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.

[Data Structure] 이진 탐색 트리 구현

1 participant