首页 > 其他 > 详细

散列ADT

时间:2018-04-13 10:52:39      阅读:236      评论:0      收藏:0      [点我收藏+]

分离链表法解决冲突的散列表ADT实现

数据结构定义如下:

 1 struct ListNode;
 2 typedef struct ListNode *Position;
 3 struct HashTbl;
 4 typedef struct HashTbl *HashTable;
 5 
 6 HashTable InitializeTable(int TableSize);
 7 void DestroyTable(HashTable H);
 8 Position Find(ElementType Key, HashTable H);
 9 void Insert(ElementType Key, HashTable H);
10 
11 struct ListNode{
12     ElementType Element;
13     Position Next;
14 };
15 
16 typedef Position List;
17 
18 struct HashTbl{
19     int TableSize;
20     List *TheLists;
21 };

初始化散列表实现:

 

散列ADT

原文:https://www.cnblogs.com/lwyeah/p/8818006.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!