With Correct Answers Version 2026/2027
Question 1
Explain the primary operational advantage of a hash table over a standard binary search tree when
performing key-value lookups.
CORRECT ANSWER: A hash table provides constant time complexity on average for lookups by
mapping keys directly to array indices via a hashing function, bypassing sequential node traversals.
Question 2
Describe how a garbage collection system identifies unreferenced memory locations to prevent leaks
during application runtime.
CORRECT ANSWER: The system traces objects starting from root references and marks all reachable
memory nodes, subsequently sweeping and reclaiming any allocated segments that were left
unmarked.
Question 3
State the structural consequence of a hash collision and how the chaining method resolves it.
CORRECT ANSWER: A collision occurs when two distinct keys yield identical hash indices; chaining
resolves this by storing colliding elements within a linked list or secondary structure attached to that
array slot.
Question 4
Explain the structural difference between a stack data structure and a queue data structure regarding
data access order.
CORRECT ANSWER: A stack operates on a Last-In, First-Out basis where elements are added and
removed from the same end, whereas a queue operates on a First-In, First-Out basis.
Question 5
Describe the purpose of a pointer variable within low-level systems programming languages.
CORRECT ANSWER: A pointer holds the raw memory address of another variable or data structure,
allowing direct memory manipulation and efficient pass-by-reference operations.
Question 6
Explain how a dynamic array handles resource allocation when its predefined storage capacity
becomes completely full.
CORRECT ANSWER: The array allocates a new, larger block of contiguous memory, copies the existing
elements into the new block, and frees the old memory segment.
Question 7
Define a memory leak and its impact on long-running daemon processes.
CORRECT ANSWER: A memory leak occurs when a program allocates memory but fails to release it
back to the operating system, causing progressive RAM exhaustion and eventual system failure.
Question 8
, Describe the balancing mechanism of an AVL tree during data insertion.
CORRECT ANSWER: An AVL tree checks the height difference between left and right subtrees and
performs single or double node rotations to maintain a strict logarithmic height balance.
Question 9
Explain the conceptual utility of a priority queue compared to a standard queue.
CORRECT ANSWER: A priority queue serves elements based on their assigned priority status or value
ranking rather than their chronological order of arrival in the structure.
Question 10
Detail how a deep copy differs from a shallow copy when duplicating a complex object containing
pointers.
CORRECT ANSWER: A shallow copy only copies the memory addresses of linked resources, sharing
them, while a deep copy allocates brand-new memory space and replicates the underlying data
completely.
Question 11
Explain the conditions required for a deadlock state to occur within a multi-threaded system
architecture.
CORRECT ANSWER: A deadlock requires mutual exclusion, hold-and-wait behavior, no resource
preemption, and a circular chain of threads waiting for resources held by each other.
Question 12
Describe how a race condition threatens data integrity when multiple threads access a shared
variable concurrently.
CORRECT ANSWER: Threads read and write the shared variable simultaneously without
synchronization, causing the final state to depend unpredictably on execution timing and overriding
valid updates.
Question 13
Define a mutex lock and explain how it enforces mutual exclusion.
CORRECT ANSWER: A mutex is a synchronization mechanism that restricts access to a shared
resource, allowing only one thread to acquire the lock and enter the critical section at a time.
Question 14
Explain how virtual memory abstracts physical hardware constraints for executing processes.
CORRECT ANSWER: Virtual memory maps a process's logical address space to fragmented physical
RAM or secondary disk storage, making it appear as a large, continuous block of memory.
Question 15
Describe the functional role of a context switch inside an operating system's CPU scheduler.
CORRECT ANSWER: A context switch saves the current state and register configuration of an active
process and loads the saved state of the next scheduled process to execute.
Question 16