-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommon.h
More file actions
50 lines (38 loc) · 812 Bytes
/
common.h
File metadata and controls
50 lines (38 loc) · 812 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// Created by Eavawu on 30/04/2017.
//
#ifndef DATA_STRUCTURE_COMMON_H
#define DATA_STRUCTURE_COMMON_H
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <math.h>
#define ELEMENT int
#define HASH_KEY int
#define HASH_VALUE int
#define HASH_DEFAULT -1
typedef struct Node {
struct Node *next;
ELEMENT data;
} Node, *PNode;
typedef struct DNode {
struct DNode *next;
struct DNode *pre;
ELEMENT data;
} DNode, *PDNode;
typedef struct TreeNode{
struct TreeNode *left;
struct TreeNode *right;
struct TreeNode *parent;
ELEMENT data;
}TreeNode,*PTreeNode;
typedef struct HashNode{
ELEMENT value;
HASH_KEY key;
struct HashNode* next;
}HashNode;
typedef struct HashMap
{
HashNode* value[15];
}HashMap;
#endif //DATA_STRUCTURE_COMMON_H