Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- 티스토리챌린지
- 배열
- array
- 함수
- 포인터
- 알고리즘
- assignment operator
- 오블완
- function
- pass by reference
- programming
- predictive analysis
- 백준
- const
- Data Science
- Python
- Class
- OOP
- 문자열
- vscode
- Deep Learning
- Object Oriented Programming
- string
- 반복문
- 파이썬
- C++
- baekjoon
- pointer
- Pre-processing
- raw data
Archives
- Today
- Total
Channi Studies
[Data Structures] Binary Trees - 1 본문
Data Science/Data Structure & Algorithm
[Data Structures] Binary Trees - 1
Chan Lee 2025. 4. 22. 01:53Binary Tree
In a list, each node has up to one successor. In a binary tree, each node has up to two children, known as a left child and a right child. "Binary" means two, referring to the two children. Some more definitions related to a binary tree:
- Leaf: A tree node with no children.
- Internal node: A node with at least one child.
- Parent: A node with a child is said to be that child's parent. A node's ancestors include the node's parent, the parent's parent, etc., up to the tree's root.
- Root: The one tree node with no parent (the "top" node).

Depth, level, and height
A few additional terms:
- The link from a node to a child is called an edge.
- A node's depth is the number of edges on the path from the root to the node. The root node thus has depth 0.
- All nodes with the same depth form a tree level.
- A tree's height is the largest depth of any node. A tree with just one node has height 0.

Special types of binary trees
Certain binary tree structures can affect the speed of operations on the tree. The following describe special types of binary trees:
- A binary tree is full if every node contains 0 or 2 children.
- A binary tree is complete if all levels, except possibly the last level, contain all possible nodes and all nodes in the last level are as far left as possible.
- A binary tree is perfect, if all internal nodes have 2 children and all leaf nodes are at the same level.

'Data Science > Data Structure & Algorithm' 카테고리의 다른 글
| [Data Structure] Binary Search Trees (0) | 2025.04.22 |
|---|---|
| [Data Structures] Binary Tree - 2 | Application of Trees (File Systems, BSP) (0) | 2025.04.22 |
| [Data Structure] Hash Table - 6 | Python Implementation (0) | 2025.04.10 |
| [Data Structure] Hash Table 5 - Common Hash Functions (0) | 2025.04.10 |
| [Data Structure] Hash Table - 4 | Hash Table Resizing (0) | 2025.04.10 |