Binary Search Tree (이진 탐색 트리)
- 탐색(Search)은 가장 중요한 컴퓨터 응용 중 하나임.
- 이진 트리 기반의 탐색을 위한 자료구조를 뜻함.
- 효율적인 탐색 작업을 위한 자료구조임.
탐색 관련 용어
- 레코드 (Record)
- 필드 (Field)
- 테이블 (Table)
- 키 (Key)
- 주요키 (Primary Key)
⭐⭐ 이진 탐색 트리의 중요 특성
- 탐색 작업을 효율적으로 하기 위한 자료구조
- key(왼쪽 서브트리) ≤ key(루트 노드) ≤ key(오른쪽 서브트리)
- 이진 탐색을 중위 순회하면 오름차순으로 정렬된 값을 얻을 수 있음.
- 자료의 탐색, 삽입, 삭제가 모두 O(log n) 시간 복잡도로 동작함.
이진 탐색 트리 클래스 다이어그램
- BinaryTree 클래스와 BinSrchTree 클래스는 상속 관계
- 부모 클래스 : BinaryTree
- 자식 클래스 : BinSrchTree