Section 9: Trees and Binary Trees (97–108)

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

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

12 Terms

1
New cards

Tree

A hierarchical data structure made of nodes connected by parent-child relationships.

2
New cards

Root

The topmost node of a tree hierarchy.

3
New cards

Leaf

A node that has no children.

4
New cards

Size (tree)

The total number of nodes contained within a tree.

5
New cards

Depth (node)

The number of connections along the path from the root to a given node.

6
New cards

Height (tree)

The maximum number of connections on a path from the root to any leaf.

7
New cards

Arity

The maximum number of children that any single node may have.

8
New cards

Binary tree

A tree structure where each node can have at most two children.

9
New cards

Standard binary-tree node references

A left-child reference and a right-child reference.

10
New cards

Linked-node representation (binary tree)

A design where each node stores its value alongside references to its left and right subtrees.

11
New cards

Purpose of an abstract binary-tree class

To define shared behavior while delegating specific operations, like left and right subtree access, to subclasses.

12
New cards

Construction of an immutable binary tree

Creating leaf nodes first, then assembling them bottom-up into parent nodes and larger subtrees.