P824 Unsuccessful Searches

Unsuccessful Searches

题目描述

above figure is a question from GRE-CS 2018. It states: Given an initially empty hash table HT of size 11. The hash function is H(key)=key%7, with linear probing used to resolve the collisions. Now hash the keys 87, 40, 30, 6, 11, 22, 98 and 20 one by one into HT. What is the average search time for unsuccessful searches? The answer is 6. Now you are supposed to write a program to solve this kind of problems.

输入格式

🔒
登录后查看完整题面
登录后查看题目

统计