Guest User

Untitled

a guest
Jun 2nd, 2016
770
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. #ifndef BST_H
  2. #define BST_H
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. typedef int Data;
  7.  
  8. typedef struct BinarySearchTree
  9. {
  10.     struct BinarySearchTree * Left;
  11.     struct BinarySearchTree * Right;
  12.     Data data;
  13. }BSTNode;
  14.  
  15. BSTNode * BST_CreateNode(Data data);
  16. BSTNode * BST_RemoveNode(BSTNode * Tree, BSTNode * Parent, Data data);
  17. BSTNode * BST_SearchNode(BSTNode * Tree, Data data);
  18. BSTNode * BST_SearchMinNode(BSTNode * Tree);
  19.  
  20. void BST_InsertNode(BSTNode * Tree, BSTNode * Child);
  21. void BST_DestroyNode(BSTNode * Node);
  22. void BST_DestroyTree(BSTNode * Tree);
  23. void BST_InorderPrintTree(BSTNode * Tree);
  24.  
  25. #endif
Add Comment
Please, Sign In to add comment