SIR RANDY CCE 105 FINAL EXAM Flashcards
YAWA
Q: What does a cryptographic algorithm require to encrypt plaintext?
A: It requires a key such as a word, number, or phrase.
Q: What does the QFront() operation do?
A: It returns the first element of the queue.
Q: When does a circular queue become full?
A: A circular queue becomes full when the front is equal to rear.
Q: How is a circular queue defined as empty?
A: A circular queue is empty when the front and rear are both equal to -1.
Q: What policy does a queue implement?
A: A queue implements a first-in, first-out (FIFO) policy.
Q: What is the inchworm effect in array-based queues?
A: The inchworm effect is the noticeable behavior when using array-based queues that can lead to inefficient memory usage.
Q: What is the result of Tenqueue(QFront() * 2) in queue T?
A: It correctly inserts a value that is 2 times the value of the first element of the queue T.
Q: How is the height of a binary tree measured?
A: The height is measured from the root to the leaf with the highest level.
Q: How is the head pointer related to memory?
A: The head pointer provides information about the memory address location.
Q: What does the Dequeue() operation do in a queue?
A: It removes the element at the front of the queue.
Q: What defines the terminal or external node in a binary tree?
A: It is known as the leaf.
Q: What does it mean if a node has no child nodes in a binary tree?
A: It is still considered a binary tree.
Q: In post-order traversal, what is the order of visiting nodes?
A: The order is left, right, root.
Q: What defines a full binary tree?
A: A full binary tree has nodes with 2 siblings.
Q: How many leaf nodes are in a tree if there are 3 leaf nodes?
A: There are 3 leaf nodes.
Q: What is pre-order traversal in a binary tree?
A: Pre-order traversal is defined as root, left, right.
Q: What is the level of the root node in a binary tree?
A: The level of the root node is always 0.
Q: How many changes of proper placement are there when rearranging numbers in a tree using heap rules?
A: There are 4 changes of proper placement.
Q: How many ancestors does node 88 have?
A: Node 88 has 3 ancestors.
Q: What does the in-order traversal for a binary tree look like?
A: It follows the order: left, root, right.
Q: What is the total value of all leaf nodes if it equals 152?
A: The total value of all leaf nodes is 152.
Q: What is the root of the tree after proper arrangement of the numbers?
A: The root becomes number 2.
Q: What happens when node 1 is removed from the heap?
A: Node 8 would replace the deleted node temporarily.
Q: How many movements are needed to place node 1 at the very root of the binary heap?
A: There will be three movements.