Search
Question: What is the result of performing a union operation on two sets A and B in a Disjoint Set U..
Question: What is the initial state of each element in a Disjoint Set Union when it is first created..
Question: In a Disjoint Set Union, what does the \'Union by Rank\' technique help to achieve?Options..
Question: What is the \'union by rank\' optimization in Disjoint Set Union?Options: Always attaching..
Question: Which of the following is NOT a typical use case for Disjoint Set Union?Options: Kruskal\'..
Question: How does path compression improve the efficiency of the Disjoint Set Union?Options: By red..
Question: What is the time complexity of the \'find\' operation in a well-optimized Disjoint Set Uni..
Question: If two elements belong to different sets, what will the \'Find\' operation return after a ..
Question: How can you convert an array into a binary heap?Options: Insert elements one by oneUse the..
Question: Which of the following is NOT a characteristic of a binary heap?Options: Complete binary t..
Question: Which of the following operations can be performed in O(1) time on a max-heap?Options: Ins..
Question: What is the primary advantage of using a binary heap over an unsorted array for implementi..
Question: In a max-heap, if the root node has a value of 20, what can be the maximum value of its ch..
Question: What is the time complexity of removing the highest priority element from a binary heap?Op..
Question: How does a priority queue differ from a regular queue?Options: It allows duplicate element..
Question: Which of the following is NOT a typical use case for priority queues?Options: Job scheduli..
Question: Which of the following algorithms uses a priority queue?Options: Merge SortDijkstra\'s Alg..
Question: In a max-heap, which property must be maintained?Options: The parent node is always less t..
Question: What is the primary difference between a binary heap and a binary search tree?Options: Bin..
Question: In a min-heap, which of the following is true?Options: The root is the smallest elementThe..
Question: What is the worst-case time complexity for building a heap from an array of n elements?Opt..
Question: What is the space complexity of a binary heap?Options: O(1)O(n)O(log n)O(n log n)Correct A..
Question: Which of the following operations can be performed in O(log n) time in a binary heap?Optio..
Question: How do you remove the maximum element from a max-heap?Options: Remove the root and re-heap..
Question: Which of the following is true about a max-heap?Options: The parent node is always smaller..
Question: Which of the following hash functions is considered a good practice?Options: Using the ide..
Question: If a hash table has a load factor of 0.75, what does this imply?Options: The table is full..
Question: Which of the following is a common method for handling collisions in a hash table?Options:..
Question: What is the ideal load factor for a hash table to maintain efficient performance?Options: ..
Question: If a hash table uses a hash function that produces a large number of collisions, what is t..