#include<stdio.h>
#include<iostream>
#include <cstring>
using namespace std;
typedef int ElemType;
#define m 13
typedef struct hnode
{
int data;
struct hnode *next;
}hnode;
typedef struct HashTable
{
int Data;
int count;
hnode *nnext;
}HashTable;
void shenchengHash(HashTable HT[m],int a[12]) //创建Hash表
{
int i,j;
hnode *p,*q;
for(j=0;j<m;j++)
{
HT[j].Data = j%m;
HT[j].nnext = 0;
HT[j].count = 0;
}
for(i=0;i<12;i++)
{
int k;
k = a[i]%m;
for(j=0
数据结构之哈希查找链地址法
最新推荐文章于 2022-05-28 10:45:25 发布