aboutsummaryrefslogtreecommitdiffstats
path: root/P1/Template/include/reducer.h
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-09-24 07:19:30 -0500
committerMatt Strapp <strap012@umn.edu>2020-09-24 07:19:30 -0500
commit2b7d79674d8a730543fd03cb9781758998126570 (patch)
tree5c3345e3336eda554a0793e8a8e8f5dd11ba141f /P1/Template/include/reducer.h
parentInitial commit (diff)
downloadcsci4061-2b7d79674d8a730543fd03cb9781758998126570.tar
csci4061-2b7d79674d8a730543fd03cb9781758998126570.tar.gz
csci4061-2b7d79674d8a730543fd03cb9781758998126570.tar.bz2
csci4061-2b7d79674d8a730543fd03cb9781758998126570.tar.lz
csci4061-2b7d79674d8a730543fd03cb9781758998126570.tar.xz
csci4061-2b7d79674d8a730543fd03cb9781758998126570.tar.zst
csci4061-2b7d79674d8a730543fd03cb9781758998126570.zip
Add project 1 files
Diffstat (limited to 'P1/Template/include/reducer.h')
-rw-r--r--P1/Template/include/reducer.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/P1/Template/include/reducer.h b/P1/Template/include/reducer.h
new file mode 100644
index 0000000..79ea452
--- /dev/null
+++ b/P1/Template/include/reducer.h
@@ -0,0 +1,24 @@
+#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;
+
+// ###### 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 \ No newline at end of file