Loading Question...
Pattern
2 Rounds
1st OA --> Conginnitive Test
2nd OA--> Core Mcqs
MCQ 1
Q. Consider the following pseudocode:
x = 1, y = 7
For i = 1 to 4:
...
Print(x * y)
--------------------------------------------------
MCQ 2
Q. What is the output after reversing the linked list?
Input:
1 -> 2 -> 3 -> NULL
A. 1 -> 2 -> 3 -> NULL
B. 2 -> 1 -> 3 -> NULL
C. 3 -> 2 -> 1 -> NULL
D. NULL -> 3 -> 2 -> 1
--------------------------------------------------
MCQ 3
Q. What is the minimum Hamming distance required to detect and correct all single-bit errors?
A. 2
B. 3
C. 4
D. 5
--------------------------------------------------
MCQ 4
Q. Which data structure is most suitable for representing a hierarchical file system?
A. Stack
B. Queue
C. Tree
D. Graph
--------------------------------------------------
MCQ 5
Q. If a dynamic array grows by a factor of 1.5 instead of 2, what happens to the amortized complexity of the append operation?
A. O(1)
B. O(log N)
C. O(N)
D. O(N log N)
--------------------------------------------------
MCQ 6
Q. Which technique is commonly used to detect cycles in a directed graph representing course prerequisites?
A. BFS using a queue
B. DFS with recursion stack (back-edge detection)
C. Binary Search
D. Union-Find
--------------------------------------------------
MCQ 7
Q. Which statement about Kahn's Algorithm is correct?
A. It uses DFS recursion.
B. It repeatedly removes vertices with in-degree zero; if fewer than V vertices are processed, the graph contains a cycle.
C. It works only on undirected graphs.
D. It finds shortest paths.
--------------------------------------------------
MCQ 8
Q. What is the time complexity of merging k sorted lists containing n total elements using a min-heap?
A. O(n)
B. O(n log n)
C. O(n log k)
D. O(k log n)
--------------------------------------------------
MCQ 9
Q. What is the time complexity of the following pseudocode?
for i = 1 to N
j = i
while j > 0
j = j / 2
A. O(N)
B. O(N log N)
C. O(log N)
D. O(N²)
--------------------------------------------------
MCQ 10
Q. Determine the complexity of:
for i = 1 to N
j = 1
while j < N
j = j * (2 * i)
A. O(log N)
B. O(N)
C. O(N log N)
D. O(N²)
--------------------------------------------------
MCQ 11
Q. What is the time complexity of Strassen's Matrix Multiplication?
A. O(n²)
B. O(n²·log n)
C. O(n^(log₂7))
D. O(n³)
--------------------------------------------------
MCQ 12
Q. Determine the complexity:
for i = 1 to N
j = 1
while j <= N
j += 3
A. O(N)
B. O(log N)
C. O(N log N)
D. O(N²)
--------------------------------------------------
MCQ 13
Q. Solve the recurrence:
T(N) = 2T(N/3) + O(1)
A. O(log N)
B. O(N)
C. O(N^(log₃2))
D. O(N log N)
--------------------------------------------------
MCQ 14
Q. Determine the complexity:
for i = 0 to N-1
if i % 100 == 0
for j = 0 to N-1
A. O(N)
B. O(N log N)
C. O(N²)
D. O(N³)
--------------------------------------------------
MCQ 15
Q. Each iteration copies an array and sorts it.
for i = 1 to N
copy array
sort array
What is the time complexity?
A. O(N)
B. O(N log N)
C. O(N²)
D. O(N² log N)
--------------------------------------------------
MCQ 16
Q. A min-heap repeatedly performs extractMin() until empty. What is the total complexity?
A. O(N)
B. O(log N)
C. O(N log N)
D. O(N²)
--------------------------------------------------
MCQ 17
Q. What is the complexity of DFS using an adjacency matrix?
A. O(V + E)
B. O(E²)
C. O(V²)
D. O(V log V)
--------------------------------------------------
MCQ 18
Q. Solve the recurrence:
T(N) = 5T(N/2) + O(1)
A. O(N²)
B. O(N^(log₂5))
C. O(N log N)
D. O(log N)
--------------------------------------------------
MCQ 19
Q. Which data structure is best for a scheduler that always executes the highest-priority task efficiently?
A. List
B. Max Heap (Priority Queue)
C. Sorted Array
D. HashMap
--------------------------------------------------
MCQ 20
Q. Which structure is used in Skip Lists?
A. Single pointer
B. Array of forward pointers
C. Parent pointer
D. Circular pointer
--------------------------------------------------
MCQ 21
Q. Which technique provides approximate distinct counting with very low memory?
A. HashSet
B. Bloom Filter
C. HyperLogLog
D. Trie
--------------------------------------------------
MCQ 22
Q. Which algorithm is most efficient for finding all prime numbers up to N?
A. Naive trial division
B. Trial division up to √N
C. Sieve of Eratosthenes
D. Trial division using known primes
--------------------------------------------------
MCQ 23
Q. Why does Small-to-Large Merging (DSU on Tree) achieve O(N log N)?
A. It uses binary search.
B. Each element moves only into a set at least twice as large.
C. It compresses the tree into a linked list.
D. It avoids recursion completely.
--------------------------------------------------
MCQ 24
Q. Which data structure is best suited for a large distributed Peer-to-Peer file-sharing system?
A. Local list
B. Central server
C. Distributed Hash Table (DHT)
D. Broadcast queries
--------------------------------------------------
MCQ 25
Q. Which recurrence counts the number of distinct Max-Heaps on n distinct keys?
A. f(n) = f(n−1) + n
B. f(n) = 2f(n/2)
C. f(n) = C(n−1,L) × f(L) × f(R)
D. f(n) = n!
--------------------------------------------------
MCQ 26
Q. Which data structure combination implements an O(1) LRU Cache?
A. Array
B. HashMap + Queue
C. HashMap + Doubly Linked List
D. HashMap + Heap
--------------------------------------------------
MCQ 27
Q. Which version-control storage approach is the most efficient?
A. Store complete copy of every version
B. Linked list of versions
C. DAG with content-addressable storage (Git-style)
D. Flat file of changes
MotorQ • Pending