[Solved] Exercise 3 Strings Binary Search Develop Program C Opens Reads Words File Called Fairy Tai Q37289897
Please write program in C

Exercise 3 – Strings and binary search Develop a program in C that Opens and reads words from a file called fairy-tails, which contains one word per line. Each word has maximum length equal to M. The number of words in the file is equal to N For each word that you read form the file, create a function Word.Insert that creates a node in a Binary Scarch Tree with the name sy.words. .Each node of the tree must contain one word. The left child must contain a word that it is lexicographically smaller while the right child contains a lexicographically bigger one (definition of lexicographical ordering) . When you finish reading the file, ask form the user to give three words as input Create a function SearchWords which searches the tree for the given, by the user, words. The function should return a percentage that shows how many of these words exist in the tree. Create a function PrintFile which prints the words exactly as they appear in the file. Create a function PrintSorted that prints all the words in a lexicographical order. Notes: (1) Choose a value for M and N. N should be greater than 10; (2) You can also use and modify the BST from Exercise 2; (3) Do not try to keep the BST balanced. (4) Use the result of stremp for ordering the words in lericographical order. Show transcribed image text Exercise 3 – Strings and binary search Develop a program in C that Opens and reads words from a file called fairy-tails, which contains one word per line. Each word has maximum length equal to M. The number of words in the file is equal to N For each word that you read form the file, create a function Word.Insert that creates a node in a Binary Scarch Tree with the name sy.words. .Each node of the tree must contain one word. The left child must contain a word that it is lexicographically smaller while the right child contains a lexicographically bigger one (definition of lexicographical ordering) . When you finish reading the file, ask form the user to give three words as input Create a function SearchWords which searches the tree for the given, by the user, words. The function should return a percentage that shows how many of these words exist in the tree. Create a function PrintFile which prints the words exactly as they appear in the file. Create a function PrintSorted that prints all the words in a lexicographical order. Notes: (1) Choose a value for M and N. N should be greater than 10; (2) You can also use and modify the BST from Exercise 2; (3) Do not try to keep the BST balanced. (4) Use the result of stremp for ordering the words in lericographical order.
Expert Answer
Answer to Exercise 3 – Strings and binary search Develop a program in C that Opens and reads words from a file called fairy-tails,… . . .
OR

