notes tree shown below in figure is binary search treefigure binary search tree binary search tree is basically binary treeand therefore it can be traversed is inorderpreorderand postorder if we traverse binary search tree in inorder and print the identifiers contained in the nodes of the treewe get sorted list of identifiers in the ascending order binary search tree is an important search structure for exampleconsider the problem of searching list if list is an ordered then searching becomes fasterif we use contiguous list and binary searchbut if we need to make changes in the list like inserting new entries and deleting old entries then it is much slower to use contiguous list because insertion and deletion in contiguous list requires moving many of the entries every time so we may think of using linked list because it permits insertions and deletions to be carried out by adjusting only few pointersbut in linked list there is no way to move through the list other than one node at time hence permitting only sequential access binary trees provide an excellent solution to this problem by making the entries of an ordered list into the nodes of binary search treewe find that we can search for key in ( log nsteps creating binary search tree we assume that every node binary search tree is capable of holding an integer data item and the links which can be made pointing to the root of the left and the right sub-tree respectively therefore the structure of the node can be defined using the following declarationstruct tnode int datatnode *lchidtnode *rchildto create binary search tree we use procedure named insert which creates new node with the data value supplied as parameter to itand inserts into an already existing tree whose root pointer is also passed as parameter the procedure accomplishes this by checking whether the tree whose root pointer is passed as parameter is empty if it is empty then the newly created node is inserted as root node if it is not empty then it copies the root pointer into variable temp it then stores value of temp in another variable temp compares the data value of the node pointed to by temp with the data value supplied as parameterif the data value supplied as parameter is smaller than the data value of the node pointed to by temp then it copies the left link of the node pointed by temp into temp (goes to the left)otherwise it copies the right link of the node pointed by temp into temp (goes to the rightit repeats this process till temp becomes nil lovely professional university