摘要: 给定一系列整型关键字和素数P,用除留余数法定义的散列函数H(Key)=Key将关键字映射到长度为P的散列表中。用线性探测法解决冲突。 1 #include <stdio.h> 2 int a[1009],b[1009]; 3 int main(){ 4 int n,p; 5 scanf("%d%d" 阅读全文
posted @ 2023-12-18 11:08 新晋软工小白 阅读(18) 评论(0) 推荐(0)
摘要: 试实现线性探测法的查找函数 1 Position Find (HashTable H,ElementType Key){ 2 int a=Key%H->TableSize; 3 int count=0; 4 while(H->Cells[a].Info!=Empty&&count!=H->Table 阅读全文
posted @ 2023-12-18 11:07 新晋软工小白 阅读(9) 评论(0) 推荐(0)