⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hashtable.h

📁 编译原理的作业 编译器
💻 H
字号:
#ifndef HASHTABLE_H_
#define HASHTABLE_H_

#include "BinarySearchTree.h"

#define PRIME  217

template <class T>
class HashTable
{
public:
	void Insert(const T& elem);
	T Exsits(const T& elem);
private:
	BinarySearchTree<T> _tree[PRIME];
};

int Key(const std::string& elem);


template <class T>
void HashTable<T>::Insert(const T& elem)
{
	_tree[Key(elem)].Insert(elem);
}

template <class T>
T HashTable<T>::Exsits(const T& elem)
{
	return _tree[Key(elem)].Exists(elem);
}

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -