Qus : 1
CUET PYQ
3
Which of the following is not an application of DFS?
1
Topological Sort 2
Determining Strongly Connected Components in a graph 3
Finding minimum distance to a node in an unweighted graph optimally 4
Solving Maze Problem Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution Topological Sort → Can be done using DFS (by finishing times). ✅
Strongly Connected Components (SCCs) → Kosaraju’s and Tarjan’s algorithms use DFS. ✅
Solving Maze Problem → DFS is a valid approach to explore paths in a maze. ✅
Finding minimum distance in an unweighted graph → This requires Breadth First Search (BFS) , not DFS, because BFS ensures the shortest path in an unweighted graph. ❌
Qus : 2
CUET PYQ
3
In a binary search tree, the worst case time complexity of inserting
and deleting a key is:
1
$O(\log n)$ for insertion and $O(\log n)$ for deletion 2
$O(n)$ for insertion and $O(\log n)$ for deletion 3
$O(n)$ for insertion and $O(n)$ for deletion 4
$O(\log n)$ for insertion and $O(n)$ for deletion Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution
• Insertion : To insert, we first locate the correct position.
This requires searching the tree = height \(h\).
Worst case: tree is skewed (\(h=n\)) → \(O(n)\).
• Deletion : To delete, we also search for the node (\(O(h)\)) and adjust pointers (constant).
Worst case: \(h=n\).
So, time = \(O(n)\).
✅ Therefore:
\[
\text{Insertion: } O(n), \quad \text{Deletion: } O(n)
\]
Qus : 3
CUET PYQ
2
In __________the search time is independent of the number of elements n.
1
Binary Search 2
Hashing
3
Linear Search 4
Jump search Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution
We need to find the search method where the search time is independent of the number of elements \(n\).
• Binary Search: Time complexity \(O(\log n)\). Depends on \(n\). ❌
• Hashing: Average case \(O(1)\). Independent of \(n\) (worst case \(O(n)\)). ✅
• Linear Search: Time complexity \(O(n)\). Depends on \(n\). ❌
• Jump Search: Time complexity \(O(\sqrt{n})\). Depends on \(n\). ❌
Therefore:
\[
\text{Correct Answer: Hashing (Option 2).}
\]
Qus : 4
CUET PYQ
1
The statements of pseudocode for searching the first element with key k in the linked list L are given below.
Arrange
them in the correct order.
(A) while (x!=NIL and x.key != k)
(B) x=L.head
(C) x=x.next
(D) return x
Choose the correct answer from the options given below:
1
(B), (A), (C), (D) 2
(A), (B), (C), (D) 3
(C), (B), (A), (D) 4
(B), (C), (A), (D) Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution Given statements:
(A) \(\; \text{while }(x \neq NIL \;\wedge\; x.key \neq k)\)
(B) \(\; x = L.head\)
(C) \(\; x = x.next\)
(D) \(\; \text{return } x\)
Correct order:
1. Initialize pointer: \((B)\) → \(x = L.head\)
2. Loop until end or key found: \((A)\) → \(\text{while}(x \neq NIL \;\wedge\; x.key \neq k)\)
3. Move to next node: \((C)\) → \(x = x.next\)
4. Return result: \((D)\) → \(\text{return }x\)
✅ Therefore, the correct sequence is:
\[
(B), (A), (C), (D)
\]
Qus : 5
CUET PYQ
2
Arrange the following time complexities in increasing order.
(A). Bubble sort (worst case)
(B). Deleting head node in singly linked list
(C). Binary search
(D). Worst case of merge sort
Choose the correct answer from the options given below:
1. (A), (B), (C), (D)
2. (B), (C), (D), (A)
3. (B), (A), (D), (C)
4. (C), (B), (D), (A)
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution
Step 1: Note the time complexities
(A) Bubble Sort (worst case): \(O(n^2)\)
(B) Deleting head node in singly linked list: \(O(1)\)
(C) Binary Search: \(O(\log n)\)
(D) Merge Sort (worst case): \(O(n \log n)\)
Step 2: Arrange in increasing order
\[
O(1)\;<\;O(\log n)\;<\;O(n \log n)\;<\;O(n^2)
\]
So:
\[
(B)\;<\;(C)\;<\;(D)\;<\;(A)
\]
Qus : 6
CUET PYQ
1
The Quicksort and randomized Quicksort procedures differ in:
1. Selection of Pivot element
2. Worst case time complexity
3. Best case time Complexity
4. Final Output
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution The difference between Quicksort and Randomized Quicksort lies mainly in the way the pivot element is chosen. Let’s analyze each option:
Selection of Pivot element ✅
Quicksort : Pivot is chosen deterministically (e.g., always first element, last element, or middle element).
Randomized Quicksort : Pivot is chosen randomly (uniformly among available elements).
→ This is the key difference .
Worst case time complexity ❌
For both, the worst case is still O(n²) .
Randomization only reduces the chance of hitting the worst case often, but it does not eliminate it.
Best case time Complexity ❌
Final Output ❌
Qus : 7
CUET PYQ
3
In case of Binary search tree which of the following procedure's running time is distinct among all
1. TREE-SUCCESSOR (finds successor of the given node)
2. TREE-MAXIMUM (finds the node with maximum value)
3. INORDER- WALK (prints all elements of a tree in inorder manner)
4. TREE-MINIMUM (finds the node with minimum value)
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution
BST Procedure Time Complexities (MathJax):
1. TREE-SUCCESSOR: \( O(h) \)
2. TREE-MAXIMUM: \( O(h) \)
4. TREE-MINIMUM: \( O(h) \)
3. INORDER-WALK: \( \Theta(n) \)
Since \(O(h)\) differs from \( \Theta(n) \) and INORDER-WALK always visits all \(n\) nodes,
\[
\boxed{\text{Distinct running time: INORDER-WALK (Option 3)}}
\]
Qus : 8
CUET PYQ
1
Match List-I with List-II
List-I List-II (Algorithm/ Application) (Data Structure Used) (A). BFS (1). Stack (B). DFS (II). B Trees (C). Heap sort (III). Priority Queue (D). Storage on secondary storages devices (IV). Queue
Choose the
correct answer from the options given below:
1. (A) - (IV), (B)-(I), (C)-(III), (D) - (II)
2. (A)-(I), (B)-(III), (C)-(II), (D-(IV)
3. (A)-(I), (B)-(II), (C) - (IV), (D) (III)
4.(A)-(II), (B)-(IV), (C)-(I) (D)-(II)
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Qus : 9
CUET PYQ
2
Given the index i of a node in a heap, we can not compute:
1. Parent ()
2. Heap size
3. Left (i)
4. Right (i)
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution
In a binary heap (array representation):
Parent(i) = \(\left\lfloor \tfrac{i}{2} \right\rfloor\),
Left(i) = \(2i\),
Right(i) = \(2i+1\)
All three can be computed directly from the index i .
But the heap size depends on the total number of elements \((n)\),
which cannot be determined from i alone.
\(\therefore\) Correct Answer: (2) Heap size
Qus : 10
CUET PYQ
4
All the elements that hash to the same slot are placed into the same linked list in :
1. Universal hashing
2. Linear Probing
3. Quadratic probing
4. Chaining
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution Linear Probing → collisions resolved by moving sequentially to next free slot.
Quadratic Probing → collisions resolved by quadratic jumps.
Universal Hashing → refers to a family of hash functions, not directly a collision handling method.
Chaining → collisions are handled by storing all elements in the same slot using a linked list (or another secondary structure).
Qus : 11
CUET PYQ
1
Match List-I with List-II
List-I List-II (Algorithm) (Recurrence relation) (A).Binary Search (I). $T(n)=T(n/2)+c$ (where c is a constant) (B).Merge Sort (II). $T(n)=2T(n/2)+\Theta(n)$ (C). Quick sort (worst case partitioning) (III). $T(n)=T(n-1)+\Theta$ (n) (D). Linear Search (IV). $T(n)=T(n-1)+c$ (where c is a constant)
Choose the
correct answer from the options given below:
1. . (A) (I), (B) (II), (C) - (III), (D) - (IV)
2. (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
3. (A) - (I), (B) -
(II), (C)-(IV), (D)-III
4. (A) (III), (B) - (IV), (C) - (I), (D) - (II)
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution Binary Search → $T(n)=T(n/2)+c$ → (I)
- Merge Sort → $T(n)=2T(n/2)+\Theta(n)$ → (II)
- Quick Sort (worst case) → $T(n)=T(n-1)+\Theta(n)$ → (III)
- Linear Search → $T(n)=T(n-1)+c$ → (IV)
Correct Answer: Option (1)
Qus : 12
CUET PYQ
2
Which of the following statements are TRUE, where |E| represents the number of edges.
(A). In case of a directed graph, the sum of lengths of all the adjacency list is E
(B). For an undirected graph, the sum of the lengths of all the adjacency list is 2|E|
(C). For a dense graph, adjacency matrix representation is preferable
(D). The memory requirement of the adjacency matrix of a graph is dependent on the number of edges
Choose the correct answer from the options given below:
1. (A), (B) and (D) only
2. (A), (B) and (C) only
3. (A), (B), (C) and (D)
4. (B), (C) and (D) only
1
1 2
2 3
3 4
4 Go to Discussion
CUET Previous Year PYQ
CUET CUET 2025 PYQ
Solution - (A) ✅ True: In a directed graph, each edge appears once in exactly one adjacency list ⇒ total length = \(|E|\).
- (B) ✅ True: In an undirected graph, each edge appears twice (both endpoints) ⇒ total length = \(2|E|\).
- (C) ✅ True: For dense graphs \((|E| \approx \Theta(V^2))\), adjacency matrix is preferable (fast \(O(1)\) lookups, storage \(O(V^2)\)).
- (D) ❌ False: Adjacency matrix memory depends only on \(V^2\), not on \(|E|\).
Final Answer:
Option (2) — (A), (B) and (C) only
Qus : 13
CUET PYQ
1
Consider implementation of database. Among the following options, choose the most appropriate data structure for this
1
B+ Tree 2
Linked list 3
Queue 4
Stack Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution When implementing a database , the most appropriate data structure depends on what part of the database you’re focusing on. Among common options, the standard and most suitable choice is:
B-Tree (or B+ Tree)
Used by almost all modern databases (MySQL, PostgreSQL, Oracle, etc.) to implement indexes .
Provides efficient search, insert, delete, and range queries in O(log n) time.
Optimized for disk storage and block reads, making it ideal for large datasets.
Other data structures used in databases:
Hash Tables
Used for hash indexes and quick equality lookups (e.g., WHERE id = 100).
Very fast for exact matches but not good for range queries.
Heaps
Linked Lists
Trie / Radix Trees
Qus : 14
CUET PYQ
2
Each node is having a successor node in ________________:
1
Singly linked list 2
Singly Circular Linked list 3
Double Linked list 4
Not possible in any linked list Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution Each node is having a successor node in a Linked List.
In a linked list , every node contains data and a pointer (or reference) to its successor node (the next node in the sequence).
The last node points to NULL (in a singly linked list) or back to the head (in a circular linked list).
Qus : 15
CUET PYQ
1
Consider a completely skewed (left / right) binary search tree with n elements. What is the worst case time complexity of searching an element in this tree?
1
O(n) 2
O(1) 3
O(logn) 4
O(n logn) Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution
A completely skewed BST (all nodes on one side) has height \(n\). Searching may traverse every node in the worst case.
Worst-case time complexity: \(O(n)\)
Qus : 16
CUET PYQ
3
If we want to find last node of a singly linked list then the correct coding is
1
if (temp → link! = NULL) temp = temp → link
2
if (temp → data = = Num) temp = temp → link
3
while (temp → link! = NULL) temp = temp → link
4
While (temp → link! = data) temp = temp → link
Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution
To find the last node of a singly linked list, we must keep moving until the link (next pointer) becomes NULL. This ensures we stop exactly at the last node.
// Structure of node
struct Node {
int data;
struct Node* link;
};
// Function to get last node
struct Node* getLastNode(struct Node* head) {
struct Node* temp = head;
// Traverse until last node
while (temp -> link != NULL) {
temp = temp -> link;
}
return temp; // Now temp points to last node
}
Explanation:
Initialize a pointer temp with head.
Keep moving forward using temp = temp → link while temp → link != NULL.
When loop ends, temp is pointing to the last node .
Correct Code Logic:
while (temp → link != NULL) temp = temp → link;
Qus : 17
CUET PYQ
3
Which of the following is correct?
(A) In directed graph sum of length of all adjacency list is $|E|$
(B) The adjacency matrix requires $O(V^2)$ memory
(C) In an undirected graph the sum of length of all adjacency list is $|E|$
(D) The memory requirement of adjacency list depends on number of edges in graph
(a) A, B, C
(b) B, C, D
(c) A, B, D
(d) A, C, D
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution
Qus : 18
CUET PYQ
1
Matching
Column A
Column B
A. BFS
I. Shortest Path
B. Sparse graph
II. Adjacency list representation
C. Collision Resolution
III. Open Addressing
D. Link list
IV. Self Referential structure
Options
(a) (A)-I, (B)-II, (C)-III, (D)-IV
(b) (A)-I, (B)-II, (C)-IV, (D)-III
(c) (A)-II, (B)-I, (C)-III, (D)-IV
(d) (A)-IV, (B)-III, (C)-II, (D)-I
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution
Qus : 19
CUET PYQ
1
Consider procedure list search (L, K) to find the first element with key K in list L by simple linear search, returning pointer to its element. Arrange the correct order.
(A) $x = L.Head$
(B) while $x \ne Nil$ and $x.key \ne K$
(C) return $x$
(D) $x = x.next$
Options
(a) A, B, D, C
(b) B, C, D, A
(c) A, D, B, C
(d) A, B, C, D
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution
Qus : 20
CUET PYQ
4
Arrange the following in the increasing order of their asympotic complexities:
(A) Insertion sort (best case)
(B) Bubble sort (worst case)
(C) Binary Search (worst case)
(D) Merge sort (worst case)
1
A, C, B, D 2
D, A, C, B 3
A, B, C, D 4
C, A, D, B Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution
Qus : 22
CUET PYQ
1
Arrange the following in increasing time complexity.
(A) Linear search worst case
(B) Binary search best case
(C) Quick sort expected running time
(D) Bubble sort worst case
(a) B, A, C, D
(b) C, B, A, D
(c) D, E, A, C
(d) B, D, C, E
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution
Qus : 24
CUET PYQ
2
The following integers are needed to be stored in ascending order using bubble sort.
5, 8, 22, 18, 1
Following are the results of various passes during the sorting process.
1
5, 1, 8, 18, 22
2
1, 5, 8, 18, 22
3
5, 8, 18, 1, 22
4
5, 8, 1, 18, 22
Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution
Qus : 26
CUET PYQ
4
What are the ways to implement a priority Queue?
(A) Arrays
(B) Fibonacci tree
(C) Heap Data Structure
(D) Linked list
Choose the correct answer from the options given below:
1
(A), (B) and (D) only
2
(B), (C) and (D) only
3
(A), (B), (C) and (D)
4
(A), (C) and (D) only
Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution
Ways to Implement a Priority Queue
The correct answer is:
(A) Arrays, (C) Heap Data Structure, and (D) Linked List
Explanation:
Arrays:
Unsorted Array: Insertion is O(1), Deletion is O(n).
Sorted Array: Insertion is O(n), Deletion is O(1).
Heap Data Structure:
Binary heaps are commonly used for efficient implementation.
Insertion and Deletion take O(log n) time.
Linked List:
Can be implemented as sorted or unsorted.
Efficiency depends on the choice of implementation.
Why not Fibonacci Tree?
Fibonacci trees are not used directly for priority queues. However, Fibonacci heaps (a separate data structure) can implement priority queues efficiently.
Qus : 27
CUET PYQ
1
Match List – I with List – II
List - I (Algorithms) List - II (Complexity) (A) Bellman - Ford algorithm (with adjacencylist representation)
(I) $O(|V|^2)$ (B)
Dijkstra Algorithm
(II) O((V+E) logV) (C)
Prim’s Algorithm
(III) O(mn) (D)
Topological sorting (with adjacency list representation)
(IV) O(m+n)
Choose the correct answer from the options given below:
1
(A – III); (B – I); (C – II); (D – IV)
2
(A – II); (B – IV); (C – III); (D – I)
3
(A – III); (B – IV); (C – I); (D – II)
4
(A – II); (B – I); (C – III); (D – IV)
Go to Discussion
CUET Previous Year PYQ
CUET CUET 2024 PYQ
Solution
Qus : 29
CUET PYQ
1
Assertion: Binary search tree property allow to print all keys in binary search tree in sorted order by simple recursive algorithm called inorder tree walk.
Reason: The inorder tree walk algorithm print the key root of subtree between printing value in its left subtree and printing those in its right subtree.
Options:
(a) Assertion is true, Reason is true, and Reason is the correct explanation of the Assertion.
(b) Assertion is true, Reason is true, but Reason is not the correct explanation of the Assertion.
(c) Assertion is true, but Reason is false.
(d) Assertion is false, but Reason is true.
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution In a Binary Search Tree (BST), all keys in the left subtree are smaller than the root and all keys in the right subtree are larger than the root.
Inorder traversal follows the order: Left Subtree → Root → Right Subtree
Because of the BST property, this traversal prints the elements in sorted order .
The reason correctly explains the inorder traversal process where the root is printed between its left and right subtree.
Correct Answer: (a) Assertion is true, Reason is true, and Reason is the correct explanation of the Assertion.
Qus : 30
CUET PYQ
4
Column A Column B (A) Minimum Spanning Tree I. Height balanced (B) Topological Sort II. Stack (C) Recursion III. Kruskal's algorithm (D) AVL Tree IV. DFS
Options:
(a) (A)-I, (B)-II, (C)-III, (D)-IV
(b) (A)-II, (B)-I, (C)-III, (D)-IV
(c) (A)-IV, (B)-III, (C)-II, (D)-I
(d) (A)-III, (B)-IV, (C)-II, (D)-I
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution Minimum Spanning Tree → Kruskal's algorithm → III Topological Sort → DFS based algorithm → IV Recursion → uses stack → II AVL Tree → height balanced tree → I
Correct Answer: (d) (A)-III, (B)-IV, (C)-II, (D)-I
Qus : 32
CUET PYQ
2
Which algorithm have same order of complexity
A. Deletion from Queue
B. Worst case search in binary search tree
C. Insertion in stack
D. Quick sort worst case
Options:
(a) C, D
(b) A, C
(c) A, B
(d) B, C
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution Deletion from Queue → O(1) Worst case search in Binary Search Tree → O(n) Insertion in Stack → O(1) Quick Sort worst case → O(n2 )
Same order complexity: Deletion from Queue and Insertion in Stack → O(1)
Correct Answer: (b) A, C
Qus : 33
CUET PYQ
3
Length or number of data element of Array can be obtained from index set by which of the following formulae.
(a) Lower bound − Upper bound − 1
(b) Lower bound − Upper bound + 1
(c) Upper bound − Lower bound + 1
(d) Upper bound + Lower bound − 1
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution Number of elements in an array is calculated using:
Length = Upper Bound − Lower Bound + 1
Example: If Lower Bound = 0 and Upper Bound = 9
Length = 9 − 0 + 1 = 10
Correct Answer: (c) Upper bound − Lower bound + 1
Qus : 34
CUET PYQ
3
Which of the following is not an application of stack.
(a) Tower of Hanoi
(b) evaluation of postfix expression
(c) Priority queue
(d) Recursion
1
(a) 2
(b) 3
(c) 4
(d) Go to Discussion
CUET Previous Year PYQ
CUET CUET MCA 2026 PYQ
Solution Tower of Hanoi → solved using recursion and stack concept Evaluation of postfix expression → uses stack Recursion → implemented using call stack
Priority queue is implemented using heap or special queue structure , not stack.
Correct Answer: (c) Priority queue
[{"qus_id":"11672","year":"2024"},{"qus_id":"11679","year":"2024"},{"qus_id":"11690","year":"2024"},{"qus_id":"11692","year":"2024"},{"qus_id":"11710","year":"2024"},{"qus_id":"11720","year":"2024"},{"qus_id":"11725","year":"2024"},{"qus_id":"11729","year":"2024"},{"qus_id":"11734","year":"2024"},{"qus_id":"11740","year":"2024"},{"qus_id":"12066","year":"2025"},{"qus_id":"12075","year":"2025"},{"qus_id":"12080","year":"2025"},{"qus_id":"12081","year":"2025"},{"qus_id":"12084","year":"2025"},{"qus_id":"12086","year":"2025"},{"qus_id":"12096","year":"2025"},{"qus_id":"12102","year":"2025"},{"qus_id":"12119","year":"2025"},{"qus_id":"12121","year":"2025"},{"qus_id":"12122","year":"2025"},{"qus_id":"12125","year":"2025"},{"qus_id":"17336","year":"2026"},{"qus_id":"17339","year":"2026"},{"qus_id":"17340","year":"2026"},{"qus_id":"17345","year":"2026"},{"qus_id":"17348","year":"2026"},{"qus_id":"17349","year":"2026"},{"qus_id":"17352","year":"2026"},{"qus_id":"17367","year":"2026"},{"qus_id":"17370","year":"2026"},{"qus_id":"17373","year":"2026"},{"qus_id":"17373","year":"2026"},{"qus_id":"17378","year":"2026"},{"qus_id":"17375","year":"2026"}]