forked from Juhi1010/TRF-Task
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.cpp
More file actions
28 lines (22 loc) · 669 Bytes
/
base.cpp
File metadata and controls
28 lines (22 loc) · 669 Bytes
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
#include<bits/stdc++.h>
#include<string.h>
#include<list>
using namespace std;
const int tablesize = 10; //Initializing the table size of the Hashtable
class Hash_table {
private:
int GRs[tablesize];
char Names[tablesize];
public:
int Hashfunct(int GR_No);
void insertKey(int GR_No , string name); //The GR number is the the key and the name is the value
void deleteKey(int GR_No);
void modifyKey(int GR_No , string name);
int searchKey(int GR_No);
void print();
};
int Hash_table::Hashfunct(int GR_No) {
return (GR_No) % tablesize;
}
int main() {
}