Computer Science EngineeringHard
Which hashing technique guarantees O(1) worst-case search time for a static set of keys?
- A. Linear probing
- B. Separate chaining
- C. Double hashing
- D. Perfect hashing
Correct answer: D. Perfect hashing
Two-level perfect hashing (FKS) gives collision-free lookups on a fixed key set.
Practise more Algorithms, Data Structures & Programming (ISRO CS) questionsAlgorithms, Data Structures & Programming (ISRO CS): notes and key points
More Algorithms, Data Structures & Programming (ISRO CS) questions
- A singly linked list holds 1->2->3->4->5. After: p=head; while(p->next && p->next->next) p=p->next->next; what is p->data?
- The number of leaf nodes in a perfect binary tree of height 5 (root at height 0) is
- A simple graph has degree sequence 4, 3, 3, 2, 2. How many edges does it have?
- A graph is bipartite if and only if
- The max-heap [90, 80, 70, 60, 50] stored in an array has the key 85 inserted with the standard sift-up. The resulting array is
- The minimum number of comparisons needed to find both the largest and second-largest of 16 distinct elements (tournament method) is