summaryrefslogtreecommitdiff
path: root/rushs/evalexpr/binary_tree_dynamic/binary_tree.h
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:08:27 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:08:27 +0200
commitc9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch)
tree3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /rushs/evalexpr/binary_tree_dynamic/binary_tree.h
add: graphs et rushs
Diffstat (limited to 'rushs/evalexpr/binary_tree_dynamic/binary_tree.h')
-rw-r--r--rushs/evalexpr/binary_tree_dynamic/binary_tree.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/rushs/evalexpr/binary_tree_dynamic/binary_tree.h b/rushs/evalexpr/binary_tree_dynamic/binary_tree.h
new file mode 100644
index 0000000..a08e4ef
--- /dev/null
+++ b/rushs/evalexpr/binary_tree_dynamic/binary_tree.h
@@ -0,0 +1,22 @@
+#ifndef BINARY_TREE_H
+#define BINARY_TREE_H
+
+struct binary_tree
+{
+ int data;
+ struct binary_tree *left;
+ struct binary_tree *right;
+};
+
+int size(const struct binary_tree *tree);
+int height(const struct binary_tree *tree);
+void dfs_print_prefix(const struct binary_tree *tree);
+void dfs_print_infix(const struct binary_tree *tree);
+void dfs_print_postfix(const struct binary_tree *tree);
+int is_perfect(const struct binary_tree *tree);
+int is_complete(const struct binary_tree *tree);
+int is_degenerate(const struct binary_tree *tree);
+int is_full(const struct binary_tree *tree);
+int is_bst(const struct binary_tree *tree);
+
+#endif /* !BINARY_TREE_H */