please tell me how i can code a BST in c++ ?
i know that each node is like that of a linked list where one 'box' stores the item.
another two boxes stores the address/pointers to the two siblings. but how can i transform this into code?
like this?
struct Node
{
int item;
Node* left_child;
Node* right_child;
};
but this is just one node- how can i get a tree????
and i also need to know the c++ code of how to traverse this tree and delete/insert nodes etc.
please help me... thanks