
[Algorithm] Binary Search Tree
·
Computer Science and Engineering/Data Structures and Algorithms
Binary search tree Search Tree 데이터 구조는 다음과 같은 operations를 제공한다. - Search : 탐색 - Minimum : 최솟값 - Maximum : 최댓값 - Predecessor : 다음에 오는 요소 - Successor : 이전 요소 - Insert : 삽입 - Delete : 삭제 이와 같은 operations들은 트리의 깊이에 실행 시간이 비례한다. 완벽한 binary tree를 이룰 때에는 $\Theta(\lg(n))$ 의 시간 복잡도를, 만약 한쪽으로 치우쳐져 linear chain에 가깝다면 $\Theta(n)$의 시간 복잡도를 가지게 된다. What is a binary search tree?그렇다면 이분 탐색 트리란 무엇일까? 이분 탐색은 이분 트..