-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTablaHash.h
43 lines (33 loc) · 973 Bytes
/
TablaHash.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _TABLAHASH_
#define _TABLAHASH_
#include <list>
#include <string>
#include <vector>
#include <algorithm>
#define TAM 33533
using namespace std;
class TablaHash{
private:
list<string> tabla[TAM]; //dispersion abierta estatica
int numPalabras;
bool esConsome (string palabra, string iterador);
bool esVocal (char c);
bool encontrarSigConsonante (string cadena, int &i);
vector<int> numerizarCesar (string cadena);
bool vectoresIguales (vector<int> v, vector<int> u);
vector<int> numerizarJuana (string cadena);
public:
int hash (string palabra, int n);
int hashConsome (string palabra);
int hashCesar (string palabra);
int hashJuana (string palabra);
TablaHash ();
void insertar(string palabra, int n);
bool consultar (string palabra);
void vaciar(void);
int numElem(void) {return numPalabras;};
string consome (string palabra);
string cesar (string palabra);
string juanagrama (string palabra);
};
#endif