What is a typical use case for a Skip List?
A. To handle dynamic sets with fast access
B. To provide probabilistic balancing and efficient insertion
C. To maintain large, static datasets
D. To handle dynamic sets with fast access
Select an option to see the answer and solution.
Which data structure is used to manage a dynamically changing set of intervals with fast queries?
A. Hash Map
B. Binary Search Tree
C. Interval Tree
D. Segment Tree
Select an option to see the answer and solution.
What is the main advantage of using a Ternary Search Tree?
A. To handle large datasets with quick access
B. To maintain a balanced binary search tree
C. To support fast dynamic insertions
D. To efficiently manage and search for key prefixes
Select an option to see the answer and solution.
Which data structure is used for implementing efficient algorithms for finding the shortest path in graphs?
A. Deque
B. Heap
C. Priority Queue
D. Stack
Select an option to see the answer and solution.
What data structure is used for fast updates and queries on a fixed-size, sequential dataset?
A. Stack
B. Queue
C. Hash Table
D. Fenwick Tree
Select an option to see the answer and solution.
In which scenario would a Bloom Filter be most beneficial?
A. When checking for membership with a trade-off between accuracy and space
B. When managing dynamic key-value pairs
C. For storing sorted data
D. For implementing priority queues
Select an option to see the answer and solution.
What data structure is most suitable for handling a fixed-size list where elements are frequently added and removed?
A. Trie
B. Heap
C. Queue
D. Circular Buffer
Select an option to see the answer and solution.
Which data structure is optimal for managing a large set of numerical ranges with efficient updates?
A. Heap
B. Linked List
C. Hash Table
D. Segment Tree
Select an option to see the answer and solution.
What is the primary benefit of using a Splay Tree?
A. To maintain strict balancing of the tree
B. To support efficient priority queue operations
C. To provide amortized time bounds for tree operations
D. To handle fixed-size data efficiently
Select an option to see the answer and solution.
What data structure is best suited for implementing a cache with a fixed size and frequent access?
A. Stack
B. LRU Cache
C. Trie
D. Stack
Select an option to see the answer and solution.
Dinic's algorithm runs faster than the Ford-Fulkerson algorithm.
Select an option to see the answer and solution.
What will be the recurrence relation of the following code?
Int sum(int n)
{
If(n==1)
return 1;
else
return n+sum(n-1);
}A. T(n) = T(n/2) + n
B. T(n) = T(n-1) + n
C. T(n) = T(n-1) + O(1)
D. T(n) = T(n/2) + O(1)
Select an option to see the answer and solution.
What is the usual size of polybius square used for encrypting English alphabets?
A. 5 X 5
B. 6 X 6
C. 26 X 26
D. 25 X 25
Select an option to see the answer and solution.
What will be the chromatic number of the following graph?
Select an option to see the answer and solution.
In how many ways can a Gomory-Hu tree be implemented?
Select an option to see the answer and solution.
Which of the following is true about the time complexity of the recursive solution of the subset sum problem?
A. It has an exponential time complexity
B. It has a linear time complexity
C. It has a logarithmic time complexity
D. it has a time complexity of O(n2)
Select an option to see the answer and solution.
Gronsfeld cipher is harder to crack than caesar cipher.
Select an option to see the answer and solution.
Consider the following code:
#include<stdio.h>
int recursive_sum(int n)
{
if(n == 0)
return 0;
return ________;
}
int main()
{
int n = 5;
int ans = recursive_sum(n);
printf("%d",ans);
return 0;
}
Which of the following lines is the recurrence relation for the above code?
A. (n - 1) +recursive_sum(n)
B. n + recursive_sum(n)
C. n + recursive_sum(n - 1)
D. (n - 1) + recursive_sum(n - 1)
Select an option to see the answer and solution.
In what time can the Hamiltonian path problem can be solved using dynamic programming?
A. O(N)
B. O(N log N)
C. O(N2 )
D. O(N2 2N )
Select an option to see the answer and solution.
In a optimal page replacement algorithm, when a page is to be replaced, which of the following pages is chosen?
A. Oldest page
B. Newest page
C. Frequently occurred page in the future
D. Not frequently occurred page in the future
Select an option to see the answer and solution.