?? hashtable.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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -