solution - Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : What is the primary purpose of hashing?

Solution :
464020260621052731 Correct Answer : Searching data quickly

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which data structure is mainly used with hashing?

Solution :
473420260621052659 Correct Answer : Hash Table

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : A good hash function should:

Solution :
262720260621052619 Correct Answer : Minimize collisions

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which collision resolution technique stores collided elements in linked lists?

Solution :
267720260621052548 Correct Answer : Separate Chaining

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which probing technique checks the next slot sequentially?

Solution :
917820260621052508 Correct Answer : Linear Probing

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : What is the average search complexity in a hash table?

Solution :
403820260621052441 Correct Answer : O(1)

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which data structure follows the Complete Binary Tree property?

Solution :
482620260621052359 Correct Answer : Heap

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : In a Max Heap, the root contains:

Solution :
754420260621052330 Correct Answer : Maximum element

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : In a Min Heap, every parent is:

Solution :
445920260621052236 Correct Answer : Smaller than or equal to its children

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Heap Sort has worst-case complexity of:

Solution :
483520260621052204 Correct Answer : O(n log n)

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : What is the worst-case search complexity in a hash table?

Solution :
830420260621052120 Correct Answer : O(n)

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which of the following is NOT a collision resolution method?

Solution :
906220260621052039 Correct Answer : Bubble Sort

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : A Binomial Heap is mainly used because:

Solution :
358420260621051934 Correct Answer : It supports efficient heap merging

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : The merge operation in a Binomial Heap takes:

Solution :
455320260621051843 Correct Answer : O(log n)

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Fibonacci Heap improves upon Binomial Heap mainly for:

Solution :
413420260621051713 Correct Answer : Decrease-Key operation

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which graph algorithm benefits most from Fibonacci Heap?

Solution :
610020260621051620 Correct Answer : Dijkstra's Algorithm

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which operation in a Fibonacci Heap has amortized O(1) complexity?

Solution :
911420260621051529 Correct Answer : Insert

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which heap has the best amortized complexity for Merge (Union)?

Solution :
850020260621051449 Correct Answer : Fibonacci Heap

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which of the following is true about load factor (α) in hashing?

Solution :
253520260621051405 Correct Answer : α = Number of Elements / Number of Buckets

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)

Question : Which statement correctly compares Binomial Heap and Fibonacci Heap?

Solution :
597420260621051323 Correct Answer : Fibonacci Heap has better amortized decrease-key complexity.

Description -

Data Structures and Algorithms : Hashing and Heap (Test 1)