Pre-middle and post-order traversal (recursive and non-recursive) and level-order traversal of binary trees

Pre-middle and post-order traversal (recursive and non-recursive) and level-order traversal of binary trees Article directory Pre-middle and post-order traversal (recursive and non-recursive) and level-order traversal of binary trees Preface 1. Recursive implementation 1. Preorder traversal 2. In-order traversal 3. Post-order traversal 2. Non-recursive implementation 1. Preorder traversal 2. In-order traversal 3. Postorder traversal 3. Layer […]

[C language data structure——Binary tree]

Article directory Article directory 1. What is a tree? tree definition tree type tree depth Basic terminology for trees 2. Full binary tree definition Characteristics of a full binary tree 3. Complete binary tree definition Features 4. Properties of binary trees 5. Storage structure of binary tree sequential storage structure chain storage structure 6. Basic […]

Data structure – binary tree (2)

Table of Contents 1. Relevant properties of binary trees: 2. Storage structure of binary tree: (1), sequential storage (array) (2) Derived data structure – heap: 1. The concept of heap 2. Classification of heaps: (3) Implementation of heap (sequential storage) 1. Definition of heap: 2. Heap initialization: 3. Heap destruction 4. Heap printing: 5. Insert […]

Binary tree (chained structure storage)

Personal business card: About the author: A sophomore student who is willing to share what he has learned on the road of study. Personal homepage: GOTXX Personal WeChat: ILXOXVJEThis article is original by GOTXX and first published on CSDN Column series: Learning C language from scratch —– The road to learning data structuresWord of the […]

Basic data structure – binary tree

1. Tree concept and structure Tree is a non-linear data structure, which is a set of hierarchical relationships composed of n (n>=0) limited nodes. It’s called a tree because it looks like an upside-down tree, which means it has the roots pointing up and the leaves pointing down. There is a special node called the […]