#include <iostream>
using namespace std;
#include "my_hash_table.h"
#include "alg3.h"
template <class ElemType>
void Show(const ElemType &e)
// 操作结果: 显示数据元素
{
cout << e << " ";
}
int main()
{
int n, m, e; // 元素个数,散列表长度,临时变量
cin >> n >> m;
MyHashTable<int, int> ht(m); // 散列表
for (int i = 0; i < n; i++)
{
cin >> e;
ht.Insert(e);
}
cout << "遍历Hash表:";
ht.Traverse(Show);
cout << endl;
return 0;
}