Difficulty: Easy
Correct Answer: hashing
Explanation:
Introduction / Context:
In file organization and database indexing, fast direct access to individual records is essential. One classical approach maps a record key to a storage address using a deterministic function, enabling constant-time average retrieval without scanning the entire file. The term for this technique is a staple in systems courses and interviews alike.
Given Data / Assumptions:
Concept / Approach:
Hashing computes address = hash_function(key). Good hash functions distribute keys uniformly to minimize collisions. Collision resolution can use chaining, open addressing, or double hashing. While databases often use B-trees for range queries, hashing excels in equality lookups where the exact key is known and rapid direct access is desired.
Step-by-Step Solution:
Verification / Alternative check:
Operating systems and database textbooks define hashing precisely as address computation from keys, confirming the answer.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing hashing with indexing trees; hash-based access is optimal for exact-match retrieval, not range scans.
Final Answer:
hashing
Discussion & Comments