summaryrefslogtreecommitdiff
path: root/lib/tree.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-02-02 18:33:22 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-02-02 18:33:22 -0500
commit2af9351db3aa97da9b0d3f23d53a593bc96c8a8e (patch)
tree684dfccba8d295c42ef6e2e070c8d6caca45f590 /lib/tree.h
parent181db84a8ffb26e436a43bb268fe5ef060206e66 (diff)
downloadc++-2af9351db3aa97da9b0d3f23d53a593bc96c8a8e.tar.gz
c++-2af9351db3aa97da9b0d3f23d53a593bc96c8a8e.tar.bz2
c++-2af9351db3aa97da9b0d3f23d53a593bc96c8a8e.zip
does potts now, no external libraries
Diffstat (limited to 'lib/tree.h')
-rw-r--r--lib/tree.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/tree.h b/lib/tree.h
new file mode 100644
index 0000000..dc22c2d
--- /dev/null
+++ b/lib/tree.h
@@ -0,0 +1,22 @@
+
+#pragma once
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+#include "types.h"
+
+typedef struct node_t {
+ v_t value;
+ v_t level;
+ struct node_t *left;
+ struct node_t *right;
+} node_t;
+
+void tree_insert(node_t **T, v_t x);
+
+bool tree_contains(node_t *T, v_t x);
+
+void tree_freeNode(node_t *T);
+