aboutsummaryrefslogtreecommitdiff
path: root/Computer_Science/data_structures/chapter_4/binary_search_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'Computer_Science/data_structures/chapter_4/binary_search_tree.h')
-rw-r--r--Computer_Science/data_structures/chapter_4/binary_search_tree.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Computer_Science/data_structures/chapter_4/binary_search_tree.h b/Computer_Science/data_structures/chapter_4/binary_search_tree.h
new file mode 100644
index 0000000..da128f8
--- /dev/null
+++ b/Computer_Science/data_structures/chapter_4/binary_search_tree.h
@@ -0,0 +1,17 @@
+#ifndef _BINARY_SEARCH_TREE_H
+#define _BINARY_SEARCH_TREE_H
+
+struct TreeNode;
+typedef struct TreeNode *Position;
+typedef struct TreeNode *SearchTree;
+typedef int elem_t;
+
+SearchTree make_empty(SearchTree t);
+Position find(elem_t x, SearchTree t);
+Position find_min(SearchTree t);
+Position find_max(SearchTree t);
+SearchTree insert(elem_t x, SearchTree t);
+SearchTree delete(elem_t x, SearchTree t);
+elem_t retrieve(Position p);
+
+#endif /* _BINARY_SEARCH_TREE_H */