-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.h
More file actions
33 lines (28 loc) · 707 Bytes
/
Node.h
File metadata and controls
33 lines (28 loc) · 707 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
29
30
31
32
33
//
// Node.h
// Project 4
//
// Created by Nihar Tamhankar on 5/29/16.
// Copyright © 2016 Nihar Tamhankar. All rights reserved.
//
#ifndef Node_h
#define Node_h
#include <string>
#include <vector>
using namespace std;
struct Node{
Node(); //default constructor
int index; //index of substring in file
string token; //substring value
Node* next; //points to next pointer in linked list in hash table value
};
class NodeHashTable{
public:
NodeHashTable(int size);
void insertNode(Node* node);
Node* find( string pattern);
private:
int m_size;
vector<Node*> hashtable; ///have a hashtable implemented as a vector of Node*
};
#endif /* Node_h */