顺序哈希表

头文件

 1 //@ author 成鹏致远
 2 //@ net http://infodown.tap.cn
 3 //@ qq 552158509
 4 //@ blog lcw.cnblogs.com
 5 
 6 #ifndef __HASHSQ_H
 7 #define __HASHSQ_H
 8 
 9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <stdbool.h>
12 #include <math.h>
13 
14 typedef struct hash_tbl
15 {
16     int len;//哈希表长度
17     int *parray;//指向表的首地址
18 }*p_hash_tbl;
19 
20 extern void hash_init(p_hash_tbl *p_hash, int len);//初始化哈希表
21 extern int hash(p_hash_tbl phash, int key);//哈希函数,返回哈希地址
22 extern void hash_insert(p_hash_tbl phash, int key);//插入key值
23 extern void hash_show(p_hash_tbl phash, int hash_val, int key);
24 
25 
26 
27 #endif
View Code

相关文章:

  • 2022-01-11
  • 2021-11-17
  • 2021-12-10
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2022-01-19
  • 2021-07-09
  • 2021-12-30
  • 2021-07-15
  • 2022-01-08
相关资源
相似解决方案