I just implement simple binary search tree in C.
struct node_struct {
int data;
struct node_struct *right, *left;
};
typedef struct node_struct Node;
With insert, delete and search function that already work find.
But i also need to implement print function that print the tree out this way
6
|-2
|-1
|-4
|-9
from above node 6 have 2 in the left and 9 in the right and in node 2 have 1 in the left and 4 in the right.
So i want to ask to how to implement this print function.