Chapter 4 Trees and Graphs Flashcards

1
Q

Tree

A

A data structure composed of nodes: one root node which can have zero or more child nodes, each of which can have zero or more child nodes pg 100

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Binary Tree

A

A tree in which each node can only have up to two children pg 101

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Binary Search Tree

A

A binary tree for which every node has all left children with a lesser value and all right children with a greater value. pg 101

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Complete Binary Tree

A

A Binary tree for which each level is completely filled except possibly the last level which must be filled left to right. pg 102

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Full Binary Tree

A

I Binary tree for which each node either has zero or two children pg 102

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Perfect Binary Tree

A

A binary tree that is both full and complete pg 102

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In-Order Traversal

A

A binary tree traversal that will visit the left node, current node, then right node Pg 103

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Pre-Order Traversal

A

Binary search which visits the current node before visiting its children pg 103

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Post-Order Traversal

A

A binary search in which the the current node is visited after all of its children pg 103

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Min-Heap

A

A complete binary tree where the root has the lowest value in the whole tree pg 103

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Trie (Prefex Tree)

A

An n-ary treee where each node contains a character and a path down the tree forms a word pg 105

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Graph

A

A collection of nodes with connections to other nodes pg 105

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Adjacency List

A

The most common way to represent a graph, each node stores a list of nodes adjacent to it pg 106

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Adjacency Matrix

A

A representation of a graph with an NxN boolean matrix, a value of true represents an adjacency pg 106

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Depth First Search

A

A graph search which searches each branch completely before searching the next branch pg 107

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Breath First Search

A

A graph search which will check each neighbor before any of their children pg 107