Please enable JavaScript.
Coggle requires JavaScript to display documents.
Trees - Coggle Diagram
Trees
Definitions
-
-
For every two vertices in a tree, there always exists exatcly one simple path from one of these vertices to the other
-
All the vertices on the simple path between the root and an arbitrary vertex v are called ancestors of v
-
Binary Search Tree
Definition
Is a binary tree whose nodes contain elements of a set of orderable items, one element per node
All elements in the left subtree are smaller than the subtree's root and all elements in the right subtree are greater than the subtree's root
-
Transversal
Preorder
The root is visited, followed by the left and right subtrees
Inorder
The left subtree is visited, followed by the root and the right subtree
Postorder
The left subtree is visited, followed by the right subtree and the root