EXAMINATION SET 2026 SOLVED
QUESTIONS GRADED A+
● Pop. Answer: Remove and return the last item from a list/data
structure
● Push. Answer: To add an item to the top of a stack/end of a queue/list
● Depth First Traversal. Answer: Each node in one branch is visited
before backtracking to explore the next branch.
● Breadth First Traversal. Answer: Begins at a root node and inspects
all the neighboring nodes. Then for each of those neighbor nodes in turn,
it inspects their neighbor nodes which were unvisited, and so on.
● Binary Tree. Answer: a tree in which each node has at most two
children.
● Binary Search Tree. Answer: A binary tree with the property that for
all parent nodes, the left subtree contains only values less than the
parent, and the right subtree contains only values greater than the parent.
This means it can be searched quickly
, ● Pre-Order Traversal. Answer: The process of systematically visiting
every node in a tree once, starting with the root node, proceeding to the
left along the tree and accessing the node when the "left" side of the
node is encountered.
● In-Order Traversal. Answer: The process of systematically visiting
every node in a tree once, starting at the root and proceeding left down
the tree, accessing the first node encountered at its "center", proceeding
likewise along the tree, accessing each node as encountered at the
"center".
● Post-Order Traversal. Answer: The process of systematically visiting
every node in a tree once, starting at the root and proceeding left down
the tree, accessing the first node encountered at its "right" side,
proceeding likewise along the tree, accessing each node as encountered
at its "right" side.
● Why are reusable components necessary?. Answer: Functions that are
performed all the time and that are complicated to code can be stored as
libraries to save time
● What is caching?. Answer: The temporary storage of program
instructions/data that have been used once and may be needed again
shortly
Eg. web caching
Advantage: allows a program to operate more quickly