Trees and Binary Trees Lecture Notes

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

flashcard set

Earn XP

Description and Tags

This set of vocabulary flashcards covers fundamental tree terminologies, binary tree properties, traversal algorithms, and specialized tree structures based on the lecture notes.

Last updated 5:10 PM on 5/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

24 Terms

1
New cards

Tree

An abstract model of a hierarchical structure consisting of nodes with a parent-child relation.

2
New cards

Linear Data Structures

Data structures like lists, arrays, queues, and stacks where elements are positioned before and after one another.

3
New cards

Root

The node without a parent that provides the access point to the tree.

4
New cards

Internal node

A node with at least one child.

5
New cards

External node (leaf)

A node without children.

6
New cards

Ancestors of a node

The parent, grandparent, grand-grandparent, and so on, of a node.

7
New cards

Depth of a node

The number of ancestors a node has.

8
New cards

Height of a tree

The maximum depth of any node.

9
New cards

Descendant of a node

The child, grandchild, grand-grandchild, and so on, of a node.

10
New cards

Subtree

A tree consisting of a node and its descendants.

11
New cards

Siblings

Nodes that share the same parent.

12
New cards

Edge

The connection between nodes.

13
New cards

Path

The sequence of nodes followed along edges from the root to a destination node.

14
New cards

Ordered tree

A tree where the children of a node are in a particular order.

15
New cards

Binary Tree

A tree type in which each node can have a maximum of 2 children: a Left child and a Right child.

16
New cards

Minimum height of a binary tree

For a tree of size nn, the minimum height is calculated as [extlog2(n)][ ext{log}_2(n)].

17
New cards

Full binary tree

A binary tree where every internal node contains either 0 or 2 children.

18
New cards

Perfect binary tree

A binary tree where all possible nodes are full from top to bottom, and all leaf nodes are on the same level.

19
New cards

Tree Traversal

A systematic manner of visiting the nodes of a tree with a running time of O(n)O(n).

20
New cards

Pre-order traversal

A traversal where a node is visited before its descendants, following the left node first.

21
New cards

In-order traversal

A traversal where nodes are read from left to right: first traversing the left subtree, then visiting the node, then following the right subtree.

22
New cards

Post-order traversal

A traversal where a node is visited after its descendants: processing the children first, then the root.

23
New cards

Breadth First Tree Traversal

A traversal where nodes are visited by level (from left to right) using a queue to store child nodes.

24
New cards

Arithmetic Expression Tree

A binary tree where internal nodes store operators and external nodes (leaves) store operands.