aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool/full_bisect_test/bin-trees.h
diff options
context:
space:
mode:
authorZhizhou Yang <zhizhouy@google.com>2017-07-21 16:06:55 -0700
committerZhizhou Yang <zhizhouy@google.com>2017-07-21 16:10:53 -0700
commit4307f4735e9a4e3189e8d43f7493bb677a4d06ba (patch)
treebf139ee25415cecde142e95791edba3803b2452a /binary_search_tool/full_bisect_test/bin-trees.h
parent7091edfaa0ec531905b7d914e9307cd74caf02ea (diff)
parent978b96a8b02935d40e3a2c57cd033dbedd8980e9 (diff)
downloadtoolchain-utils-android-o-iot-preview-5.tar.gz
Merge branch 'aosp/mirror-chromium-master' into update_utilsandroid-o-iot-preview-5o-iot-preview-5
Update toolchain_utils from ChromeOS side, which includes: initializing Android toolchain benchmark suite and other changes since last merging. Bug: None. Test: None. Change-Id: I9cd74f4377a8109872414636342be0b9f5df2db5
Diffstat (limited to 'binary_search_tool/full_bisect_test/bin-trees.h')
-rw-r--r--binary_search_tool/full_bisect_test/bin-trees.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/binary_search_tool/full_bisect_test/bin-trees.h b/binary_search_tool/full_bisect_test/bin-trees.h
new file mode 100644
index 00000000..1c4fa199
--- /dev/null
+++ b/binary_search_tool/full_bisect_test/bin-trees.h
@@ -0,0 +1,29 @@
+#ifndef _BIN_TREES_H
+#define _BIN_TREES_H
+
+
+struct bin_tree_struct {
+ int data;
+ char c_data;
+ struct bin_tree_struct *left;
+ struct bin_tree_struct *right;
+};
+
+typedef struct bin_tree_struct * tree_ptr;
+
+
+struct stack_struct {
+ tree_ptr data;
+ struct stack_struct *next;
+};
+
+
+void search_tree_insert (tree_ptr *, int);
+void pre_order_traverse (tree_ptr);
+void pre_order_traverse_no_recurse (tree_ptr);
+void in_order_traverse (tree_ptr);
+void in_order_traverse_no_recurse (tree_ptr);
+void push (struct stack_struct **, tree_ptr);
+tree_ptr pop (struct stack_struct **);
+
+#endif /* _BIN_TREES_H */