Objective Assessment
150 Practice Questions with 100% Verified
Answers and Detailed Explanations || 2026/2027
|| Guaranteed Pass || updated
SECTION 1: ALGORITHM ANALYSIS & BIG O NOTATION
1. Which data structure operates on a Last-In, First-Out (LIFO) basis?
A. Queue
B. Stack
C. Linked List
D. Binary Tree
Explanation: A stack restricts insertion and deletion to one end (the "top"),
ensuring the last element added is the first one removed .
2. Which notation provides a strict mathematical upper bound on the growth
rate of an algorithm's running time?
A. Omega (Ω)
B. Theta (Θ)
C. Big O (O)
D. Little o (o)
Explanation: Big O notation describes the worst-case scenario or asymptotic upper
bound of an algorithm's performance .
3. What is the time complexity to access an element at a specific index in a
dynamic array?
A. O(1)
B. O(log n)
,C. O(n)
D. O(n²)
Explanation: Arrays use contiguous memory locations, allowing direct
mathematical calculation of any index address in constant time .
4. What is the worst-case time complexity of searching for an element in a
binary search tree (BST) that is completely unbalanced?
A. O(1)
B. O(log n)
C. O(n)
D. O(n log n)
Explanation: An unbalanced BST degrades into a linear linked list shape, forcing a
sequential search through all n nodes .
5. Which complexity class represents constant time?
A. O(1)
B. O(log n)
C. O(n)
D. O(n²)
Explanation: O(1) means the algorithm takes the same amount of time regardless
of input size .
6. What is the time complexity of binary search on a sorted array?
A. O(n)
B. O(log n)
C. O(n log n)
D. O(1)
Explanation: Binary search repeatedly divides the search space in half, resulting in
logarithmic time .
7. What is the time complexity of a linear search algorithm in the worst case?
A. O(1)
B. O(log n)
C. O(n)
D. O(n²)
,Explanation: In the worst case, you must examine every element in the array .
8. If an algorithm contains two nested loops that both iterate up to n, what is its
overall time complexity?
A. O(n)
B. O(n log n)
C. O(n²)
D. O(2ⁿ)
Explanation: Nested loops that each go up to n result in n × n = n² operations .
9. What is the time complexity of merge sort?
A. O(n)
B. O(log n)
C. O(n log n)
D. O(n²)
Explanation: Merge sort continually divides the array in half (log n steps) and
takes O(n) time to merge them back, regardless of initial order .
10. What is the worst-case time complexity of quicksort?
A. O(n log n)
B. O(log n)
C. O(n²)
D. O(n)
Explanation: QuickSort's worst-case occurs when the pivot is always the smallest
or largest element, resulting in O(n²) .
11. What is the average-case time complexity of quicksort?
A. O(n²)
B. O(n log n)
C. O(n)
D. O(1)
Explanation: With a good pivot choice, quicksort performs efficiently and achieves
O(n log n) on average .
12. What is the time complexity of accessing an element by index in a linked
list?
, A. O(1)
B. O(log n)
C. O(n)
D. O(n²)
Explanation: Unlike arrays, linked lists do not support direct access; you must
traverse from the head .
13. Which notation describes the best-case complexity of an algorithm?
A. Ω (Omega)
B. O (Big O)
C. Θ (Theta)
D. ω (Little Omega)
Explanation: Omega notation (Ω) represents the lower bound or best-case growth
rate of an algorithm .
14. Which notation describes the average-case complexity of an algorithm?
A. Ω (Omega)
B. Θ (Theta)
C. O (Big O)
D. ω (Little Omega)
Explanation: Theta notation (Θ) describes both an upper and lower bound,
indicating a tight bound on the growth rate .
15. What is the space complexity of an in-place sorting algorithm?
A. O(1)
B. O(log n)
C. O(n)
D. O(n²)
Explanation: In-place sorting algorithms manipulate the input data directly
without requiring significant additional temporary memory structures .
SECTION 2: DATA TYPES & ABSTRACT DATA TYPES (ADT)