blob: 44afe2a824ad5fe3a510ac4b2e1f232729278d81 (
plain) (
blame)
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
|
#ifndef REDUCER_H
#define REDUCER_H
#include "utils.h"
#define MAXKEYSZ 50
// ###### DO NOT REMOVE ######
typedef struct finalKeyValueDS {
char key[MAXKEYSZ];
int value;
struct finalKeyValueDS *next;
} finalKeyValueDS;
finalKeyValueDS *finalDS = NULL;
// ###### DO NOT REMOVE ######
finalKeyValueDS *createFinalKeyValueNode(char *value, int count);
finalKeyValueDS *insertNewKeyValue(finalKeyValueDS *root, char *word, int count);
void freeFinalDS(finalKeyValueDS *root);
// ###### DO NOT REMOVE ######
void writeFinalDS(int reducerID);
void reduce(char *key);
#endif
|