Home
Mcqs
Quizes
Q&A
Past Paper
blog
Spaces
Join Now
Sign in
Tamoban Javnoi
COMPUTER SCIENCE & IT
-
Data Structures & Algorithms
Which data structure is most suitable for implementing an LRU (Least Recently Used) cache?
A. Stack.
B. Queue.
C. HashMap and Doubly Linked List.
D. Binary Search Tree.
Tamoban Javnoi
COMPUTER SCIENCE & IT
-
Data Structures & Algorithms
Why is the space complexity of a recursive algorithm often higher than its iterative counterpart?
A. Due to the creation of additional variables.
B. Because recursion requires additional stack space for each function call.
C. Because recursive algorithms are slower.
D. Due to the use of dynamic memory allocation.
Tamoban Javnoi
COMPUTER SCIENCE & IT
-
Data Structures & Algorithms
Where is a heap data structure typically used?
A. To implement a priority queue.
B. To perform depth-first search (DFS).
C. To store adjacency lists.
D. To implement hash tables.
Tamoban Javnoi
COMPUTER SCIENCE & IT
-
Data Structures & Algorithms
When does the Dijkstra's algorithm fail to find the shortest path in a graph?
A. When the graph is disconnected.
B. When the graph contains negative weight edges.
C. When the graph contains cycles.
D. When the graph is undirected.
Tamoban Javnoi
COMPUTER SCIENCE & IT
-
Data Structures & Algorithms
What is the time complexity of inserting an element into a Binary Search Tree (BST) in the worst case?
A. O(log n).
B. O(n).
C. O(n log n).
D. O(1).
COMPUTER SCIENCE & IT
Web Design & Development
Database Management Systems
Computer Networks & Security
Operating Systems
Data Structures & Algorithms