(i) WAP to create, insert, search and delete operations in a binary search tree (BST).
(ii) In this question, with the help of BST , develop a file search utility in which the user will beasked to enter a word to be searched in a text file. As an output, the program should print (a) totalnumber of occurrences of the given word in the text file (b) Line numbers in which the given wordis present.In order to construct the BST, scan each word of the text file. Let the first word of the file be theroot node of the BST. So, the second word, be its left child or right child, will depend on the valuereturned by STRCMP (firstword, secondword) function. If the returned value is positive then thesecond word will be the left child. If the returned value is negative then the second word will be theright child. Similarly, the whole BST can be constructed. With each node, a linked list should beassociated to store the line numbers on which the word occurs. So, a node in the linked list willhave three fields, (a) line number, (b) number of occurrences of the word in that line number (c)pointer to the next node.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here