@@ -2,7 +2,7 @@ Documentation
2
2
========
3
3
4
4
This is the documentation for the source code. I'll update it from time to time if I found bugs or things that
5
- needs to be discussed.
5
+ need to be discussed.
6
6
7
7
#### Node Structure
8
8
``` C
@@ -22,4 +22,29 @@ The node is composed of 1 value and 3 pointers: (This is a bit self-explanatory,
22
22
23
23
There are also 2 global pointer variables used in the whole program:
24
24
* tRoot : Points to the root of the whole tree
25
- * tLeaf : Points to the last inserted leaf in the tree
25
+ * tLeaf : Points to the last inserted leaf in the tree
26
+
27
+ #### BST Insertion like functions
28
+ ``` C
29
+ struct node* newNode (int value,struct node * parent);
30
+ struct node* insertN(struct node * root,int value,struct node * parent);
31
+ ```
32
+
33
+ The two functions are the core in creating a BST like structure.
34
+ * newNode function : This function creates a basic node. Paremeters:
35
+ ** value : The value you want to put to the node.
36
+ ** parent : The parent of the Node (Can also be NULL).
37
+ * insertN function : This inserts a new node properly into the tree. Parameters:
38
+ ** root : Pointer to the root of the tree of where to insert the new node.
39
+ ** value : The value you want to insert.
40
+ ** parent : The parent of the new node you are inserting. (A bit redundant, but this helps a lot in tracking trees)
41
+
42
+ If you want a more thorough explanation of the BST functions,
43
+ then you can go to this link: [Binary Search Tree Operations Explanation (Bisaya)](http://pastebin.com/DCkF4JAn)
44
+
45
+
46
+
47
+
48
+
49
+
50
+
0 commit comments