NEW
Font size
WorksheetsFINAL EXAM CC104
Total questions: 50
Worksheet time: 38mins
A student information system frequently performs insertions and deletions of student records while sequentially processing them. Random access is not required. Which data structure is the MOST efficient choice?
Static Array
Singly Linked List
Stack
Heap
In choosing between an array and a linked list, which factor MOST directly affects insertion performance at the beginning of the structure?
Data type consistency
Contiguous memory requirement
Sorting method used
Time complexity notation
Algorithm analysis focuses on asymptotic behavior mainly to:
Measure exact execution time
Account for all hardware constraints
Ignore input size variation
Compare growth rates independently of machine details
In a worst-case scenario, Binary Search will terminate when:
The target is at the first index
The middle element is repeatedly selected
The search space becomes empty
The array becomes sorted
Given an input list of n elements, what is the time complexity of Linear Search when the target is absent?
O(1)
O(log n)
O(n)
O(n²)
Why is Worst-Case Analysis preferred in systems that require guaranteed response time?
It reduces memory usage
It reflects average performance
It provides performance assurance under all conditions
It simplifies algorithm implementation
Which asymptotic notation provides a tight bound on algorithm performance?
Big-O
Omega
Theta
Logarithmic
A data structure allows traversal in both forward and backward directions. Which additional memory requirement enables this feature?
Contiguous storage
Indexing
Two pointers per node
Recursive calls
In which linked list variant does traversal never encounter a NULL reference?
Singly linked list
Doubly linked list
Circular linked list
Static linked list
What is the primary limitation of linked lists compared to arrays?
Fixed size
Higher insertion cost
No direct indexed access
High memory consumption for data
Attempting a POP operation on an empty stack results in:
Stack overflow
Stack underflow
Memory leak
Infinite loop
Which real-world system MOST clearly demonstrates stack behavior?
Customer service counter
Job scheduling queue
Function call execution
Bank transaction ledger
In which queue type are elements removed based on importance rather than arrival time?
Linear queue
Circular queue
Priority queue
Deque
A circular queue is primarily used to:
Eliminate overflow
Reduce memory wastage
Improve searching speed
Maintain sorted order
Binary Search is significantly more efficient than Linear Search because it:
Uses recursion
Requires less memory
Eliminates unnecessary comparisons
Divides the problem space at each step
Binary Search fails on unsorted data because:
The midpoint cannot be calculated
The divide-and-conquer logic becomes invalid
It requires additional memory
It compares too many elements
Despite its higher time complexity, Linear Search is preferred when:
Data is large and static
Data is sorted
Data size is small or frequently modified
Worst-case performance is critical
Which sorting algorithm repeatedly selects the smallest element and places it in correct position?
Bubble Sort
Selection Sort
Insertion Sort
Heap Sort
Which sorting algorithm performs best when the input list is nearly sorted?
Quick Sort
Heap Sort
Insertion Sort
Merge Sort
Bubble Sort is inefficient for large datasets mainly due to:
Excessive recursion
High space complexity
Repeated unnecessary comparisons
Poor memory locality
An algorithm that divides a list, recursively sorts sublists, and merges them is:
Quick Sort
Heap Sort
Merge Sort
Selection Sort
The performance of Quick Sort is MOST affected by:
Number of recursive calls
Pivot element selection
Auxiliary space
Size of input
Quick Sort degrades to O(n²) complexity when:
Input size is small
Data contains duplicates
Poor pivot selection occurs repeatedly
Recursion is removed
Which sorting algorithm guarantees O(n log n) in best, average, and worst cases?
Quick Sort
Merge Sort
Heap Sort
Insertion Sort
The main drawback of Merge Sort is:
Instability
High comparison count
Additional memory requirement
Poor performance on large data
Heap Sort is considered memory-efficient because it:
Is recursive
Avoids comparisons
Sorts in place
Uses linked structures
In a max-heap structure, the root node always stores the:
Smallest element
Median value
Largest element
Most recently added element
Average-case analysis is important because it:
Shows minimal execution time
Reflects typical input behavior
Guarantees execution limits
Eliminates worst-case scenarios
An algorithm with O(log n) complexity is considered highly scalable because:
Execution time remains constant
Input size has minimal effect on performance
Memory usage is fixed
Sorting is not required
Which data structure is MOST suitable for managing recursive function calls?
Queue
Stack
Tree
Array
Printer job scheduling best exemplifies which principle?
LIFO
FIFO
Priority-based access
Random access
Random access is inefficient in linked lists because:
Nodes are contiguous
Index calculation is complex
Each node must be traversed sequentially
Memory is dynamically allocated
Which operation is NOT directly supported by stacks?
Push
Pop
Peek
Arbitrary element access
Which factor MOST influences choosing between array and linked list implementations?
Data size variability
Programming paradigm
Sorting algorithm used
Input data type
In an iterative Binary Search implementation, space complexity is:
O(n)
O(log n)
O(1)
O(n log n)
Binary Search is NOT recommended when:
Data is sorted
Dataset is large
Insertions and deletions are frequent
Fast search time is required
Which sorting algorithm is typically the fastest on average for large datasets?
Bubble Sort
Insertion Sort
Quick Sort
Selection Sort
Selection Sort remains inefficient despite fewer swaps because it:
Requires extra memory
Always performs O(n²) comparisons
Is unstable
Requires recursion
Which data structure best models a social networking system?
Stack
Queue
Tree
Graph
Hierarchical data such as file directories are best represented using:
Graph
Queue
Stack
Tree
Data structures define ________, while algorithms define __________.
Syntax, logic
Data storage, data processing
Memory, execution speed
Hardware, software
In real-time systems, which metric is most critical?
Average-case performance
Worst-case performance
Best-case performance
Space utilization
Which array operation is MOST costly compared to linked lists?
Access by index
Traversal
Insertion at the beginning
Sorting
Which sorting algorithm is NOT stable by default?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Scalability of an algorithm refers to its ability to:
Minimize memory usage
Handle increasing input efficiently
Eliminate recursion
Simplify implementation
Why is algorithm analysis performed before coding?
To reduce programming effort
To estimate performance and resource usage
To eliminate errors
To reduce syntax complexity
Which data structure is best for implementing playlist navigation with previous and next controls?
Stack
Singly linked list
Doubly linked list
Queue
A priority queue differs from a standard queue because it:
Uses FIFO strictly
Requires sorted input
Dequeues elements based on priority
Eliminates overflow
Which concept BEST explains why efficient algorithms reduce operational cost?
Reduced code length
Lower resource consumption
Faster compilation
Smaller program size
The ultimate goal of studying Data Structures and Algorithms in Information Systems is to:
Learn programming syntax
Design scalable, efficient, and reliable systems
Replace hardware limitations
Eliminate software errors
