Discussion
Match each symbol table implementation with its typical lookup cost.
List I
A. unordered linear list
B. balanced search tree
C. hash table
D. hash table with every key colliding
List II
1. near constant on average
2. linear in the entry count
3. linear in the entry count
4. logarithmic in the entry count
Answer: D
The comparison is what drives the choice in practice. A hash table wins on average but degenerates to a list in the pathological case, which is why the hash function matters. A well chosen function makes that case vanishingly unlikely in practice.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development