SIR RANDY CCE 105 FINAL EXAM Flashcards

YAWA

1
Q

Q: What does a cryptographic algorithm require to encrypt plaintext?

A

A: It requires a key such as a word, number, or phrase.

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

Q: What does the QFront() operation do?

A

A: It returns the first element of the queue.

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

Q: When does a circular queue become full?

A

A: A circular queue becomes full when the front is equal to rear.

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

Q: How is a circular queue defined as empty?

A

A: A circular queue is empty when the front and rear are both equal to -1.

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

Q: What policy does a queue implement?

A

A: A queue implements a first-in, first-out (FIFO) policy.

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

Q: What is the inchworm effect in array-based queues?

A

A: The inchworm effect is the noticeable behavior when using array-based queues that can lead to inefficient memory usage.

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

Q: What is the result of Tenqueue(QFront() * 2) in queue T?

A

A: It correctly inserts a value that is 2 times the value of the first element of the queue T.

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

Q: How is the height of a binary tree measured?

A

A: The height is measured from the root to the leaf with the highest level.

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

Q: How is the head pointer related to memory?

A

A: The head pointer provides information about the memory address location.

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

Q: What does the Dequeue() operation do in a queue?

A

A: It removes the element at the front of the queue.

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

Q: What defines the terminal or external node in a binary tree?

A

A: It is known as the leaf.

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

Q: What does it mean if a node has no child nodes in a binary tree?

A

A: It is still considered a binary tree.

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

Q: In post-order traversal, what is the order of visiting nodes?

A

A: The order is left, right, root.

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

Q: What defines a full binary tree?

A

A: A full binary tree has nodes with 2 siblings.

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

Q: How many leaf nodes are in a tree if there are 3 leaf nodes?

A

A: There are 3 leaf nodes.

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

Q: What is pre-order traversal in a binary tree?

A

A: Pre-order traversal is defined as root, left, right.

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

Q: What is the level of the root node in a binary tree?

A

A: The level of the root node is always 0.

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

Q: How many changes of proper placement are there when rearranging numbers in a tree using heap rules?

A

A: There are 4 changes of proper placement.

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

Q: How many ancestors does node 88 have?

A

A: Node 88 has 3 ancestors.

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

Q: What does the in-order traversal for a binary tree look like?

A

A: It follows the order: left, root, right.

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

Q: What is the total value of all leaf nodes if it equals 152?

A

A: The total value of all leaf nodes is 152.

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

Q: What is the root of the tree after proper arrangement of the numbers?

A

A: The root becomes number 2.

14
Q

Q: What happens when node 1 is removed from the heap?

A

A: Node 8 would replace the deleted node temporarily.

15
Q

Q: How many movements are needed to place node 1 at the very root of the binary heap?

A

A: There will be three movements.

16
Q: How many nodes are left in the tree after deleting the root node?
A: There are 9 nodes left in the tree after deletion.
17
18
19
19
20
20
21
22
22
22
23
23
23
24
24
25
26
26
26
27
27
27
28
28
28
29
29
29