Topic 13 (FINALS) Flashcards

(33 cards)

1
Q

is a widely used data structure that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node, represented as a set of linked nodes.

A

Tree

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

_______ in a tree can have any number of children, compared to a binary tree.

A

Nodes

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

A non-linear hierarchical data structure where each node can have any number of children.

A

Tree (General Tree)

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

A special type of tree where each node can have at most two children — usually called left and right.

A

Binary Tree

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

What are the types of Tree

A

Ordered Tree
Oriented Tree
Free Tree

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

is a tree where the order of the children of each node matters. Changing the order of children creates a different tree. Each node’s children are arranged in a specific sequence (left-to-right order).

A

Ordered Tree

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

In an ________ tree, the order of each node in the tree is significant.

A

Ordered Tree

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

is a tree where the direction of edges is clearly defined — usually from parent to child.

A

Oriented Tree

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

Oriented Tree is essentially a directed version of a tree, represented as a _____________

A

Directed Acyclic Graph (DAG).

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

it is a tree in which the order of the subtrees of every node in a tree is immaterial / insignificant.

A

Oriented Tree

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

is an undirected tree, meaning the edges have no direction.

A

Free Tree

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

Free Tree defined as a connected __________

A

Acyclic Undirected Graph.

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

has no designated root node and the orientation from a node to any other node is insignificant.

A

Free Tree

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

What are the properties of a tree

A

Number of Nodes and Edges
Root Node
Parent and Child Nodes
Leaf (External) Nodes
Internal Nodes
Degree of a Node
Degree of a Tree
Level (Depth) of a Node
Height of a Tree
Subtree
Path
Ancestor and Descendant Nodes

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

A tree with NNN nodes always has N−1N - 1N−1 edges. Except the root, each node has exactly one parent, which creates exactly one edge per node.

A

Number of Nodes and Edges

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

is the topmost node of the tree. It has no parent and there is exactly one root in a tree.

17
Q

is any node that has one or more children.

18
Q

is a node that descends from a parent.

19
Q

are nodes with no children.

A

Leaf (External) Nodes

20
Q

They are usually located at the bottom level of the tree.

A

Leaf (External) Nodes

21
Q

are nodes that are not leaf nodes. They always have at least one child.

A

Internal Nodes

22
Q

is the maximum degree among all its nodes.

A

Degree of a Tree

23
Q

In a binary tree, the ______ is always less than or

24
Q

is its distance from the root.

A

Level (Depth) of a Node

25
The root is at level 0, and its children are at level 1.
Level (Depth) of a Node
26
is the length of the longest path from the root to a leaf.
Height of a Tree
27
A tree with only the root node has a height of ________ depending on convention.
0 or 1
28
is formed from any node and all of its descendants.
Subtree
29
Every node in a tree can be considered the root of a _________.
Subtree
30
is a sequence of nodes and edges connecting two nodes.
Path
31
is defined as the number of edges
Path Length
32
is any node that lies on the path from a given node to the root.
Ancestor
33
is any node that comes below a given node in the hierarchy.
Descendant