itec33 Flashcards

1
Q

is a pictorial representation of a set of objects where some pairs of objects are connected by links.

A

graph

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

The interconnected objects are represented by points

A

vertices

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

links that connected the vertices

A

edges

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

Each node of the graph is represented as ___

A

vertex

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

represents a path between two vertices or a line between two vertices

A

edge

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

Two node or vertices are adjacent if they are connected to each other through an edge.

A

adjacency

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

represents a sequence of edges between the two vertices.

A

path

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

basic primary operations of a graph

A

add vertex
add edge
display vertex

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

algorithm traverses a graph in a depthward motion and uses a stack to remember to get the next vertex to start a search, when a dead end occurs in any iteration.

A

depth first traversal (dfs)

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

algorithm traverses a graph in a breadthward motion and uses a queue to remember to get the next vertex to start a search, when a dead end occurs in any iteration.

A

breadth first traversal (bfs)

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

represents the nodes connected by edges.

A

tree

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

can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of
a value, together with a list of references to nodes (the “children”), with the constraints that
no reference is duplicated, and none points to the root.

A

tree data structure

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

refers to the sequence of nodes along the edges of a tree.

A

path

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

The node at the top of the tree

A

root

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

Any node except the root node has one edge upward to a node called parent.

A

parent

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

The node below a given node connected by its edge downward

A

child

17
Q

The node which does not have any child node

A

leaf

18
Q

represents the descendants of a node.

A

subtree

19
Q

refers to checking the value of a node when control is on the node

A

visiting

20
Q

means passing through nodes in a specific order.

A

traversing

21
Q

represents the generation of a node. If the root node is at level 0, then its next child node is at level 1, its grandchild is at level 2,
and so on.

A

levels

22
Q

represents a value of a node based on which a search operation is to be carried out for a node.

A

keys

23
Q

A node’s left child must have a value less than its parent’s value and the node’s right child must have a value greater than its parent value.

A

binary search tree representation

24
Q

basic operations in binary search tree data structure

A

insert
search
preorder traversal
in-order traversal
post-order traversal

25
Q

process to visit all the nodes of a tree and may print their values too.

A

traversal

26
Q

In this traversal method, the left subtree is visited first, then the root and later the right sub-tree.

A

inorder traversal

27
Q

In this traversal method, the root node is visited first, then the left subtree and finally the right subtree.

A

pre-order traversal

28
Q

In this traversal method, the root node is visited last, hence the name. First we traverse the left subtree, then the right subtree and finally the root node.

A

post-order traversal

29
Q

is a hierarchical data structure in which each node has at most two children generally referred as left child and right child.

A

binary tree

30
Q

3 components of nodes

A

pointer to left subtree
pointer to right subtree
data element

31
Q

It has a root node and every node has at most two children.

A

rooted binary tree

32
Q

It is a tree in which every node in the tree has either 0 or 2 children.

A

full binary tree

33
Q

It is a binary tree in which all interior nodes have two children and all leaves have the same depth or same level.

A

perfect binary tree

34
Q

It is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.

A

complete binary tree

35
Q

A binary tree is height balanced if it satisfies the following constraints:

  1. The left and right subtrees’ heights differ by at most one, AND
  2. The left subtree is balanced, AND
  3. The right subtree is balanced
A

balanced binary tree

36
Q

It is a tree is where each parent node has only one child node. It behaves like a linked list

A

degenerate tree

37
Q

types of binary tree

A

rooted
full
perfect
complete
balanced
degenerate

38
Q

binary search tree operations

A

search
insert
delete

39
Q

node with two children rules

A

in order predecessor
in order successor