Considering as example the data provided in the files exams.csv and exams2.csv (included in the archive exams.zip) write a C program for creating a BST according to grades data and add the functions for printing (or saving to file) the height of the BST, the inorder traversal and the level order top-down left-to-right traversal. Each line in the files contains the following information: student name and surname, grade (integer value from 60 to 100), exam name separated by ';' character Consider that the student data (name + surname) are no longer than 15 bytes and exam data are no longer than 38 bytes. Please include comments to describe the sections of your code. As an example, considering only the input grades values (that's not considering students and exams data to be printed too) in the sequence below 84 72 69 100 87 99 81 86 68 70 84 / \ 72 100 / \ / 69 81 87 / \ / \ 68 70 86 99 the above program should print Height of the Binary Tree: 3 Print inorder traversal (together with students and exams data here missing in the example) 68 69 70 72 81 84 86 87 99 100 Print level order top-down left-to-right traversal (together with students and exams data here missing in the example) 84 72 100 69 81 87 68 70 86 99 or (a bit better printing also the level number) Print level order top-down right-to-left traversal Level 0: 84 Level 1: 72 100 Level 2: 69 81 87 Level 3: 68 70 86 99 /******************************************************************************/ Create a program that reads the 22 files race1.csv ... race22.csv (included in the archive races.zip) containing the F1 championship results of the 22 car racings of the previous year. Each line in the files contains the following information: driver name and surname, car manufacturer, points achieved in the race separated by ';' character. Note that we can consider that the driver column is composed, at most, by 20 characters, car manufacturer column by 40. In the C language program, you have to include the following steps: - Read each results file in sequence (that's from race1.csv to race22.csv) - Use linked lists to manage drivers and car manufacturers points - Calculate the total points of every driver and car manufacturer after each car racing and save (or print) drivers and car manufacturers total points after each car racing (in two different files or as many files as the car racings number) Consider that each file contains the drivers that achieved points in that car racing therefore when reading a new file the program can read new drivers (that's drivers that did not achieve points in previous car racings) Please include comments to describe the sections of your code QUESTIONS Q1. How does searching a value in a Binary Search Tree work? Q2. What happens if we search for a value that is not present in the Binary Search Tree? Q3. Which of the following is false about a binary search tree? a) The left child is always smaller than its parent b) The right child is always larger than its parent c) The left and right sub-trees should also be binary search trees d) Inorder sequence gives decreasing order of elements Q4. What is the speciality about the inorder traversal of a binary search tree? a) It traverses in a non increasing order b) It traverses in an increasing order c) It traverses in a random fashion d) It traverses based on priority of the node Q5. How will you find the minimum element in a binary search tree? a) public void min(Tree root) { while(root.left() != null) { root = root.left(); } System.out.println(root.data()); } b) public void min(Tree root) { while(root != null) { root = root.left(); } System.out.println(root.data()); } c) public void min(Tree root) { while(root.right() != null) { root = root.right(); } System.out.println(root.data()); } d) public void min(Tree root) { while(root != null) { root = root.right(); } System.out.println(root.data()); } Q6. Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order traversal sequence of the resultant tree? a) 7 5 1 0 3 2 4 6 8 9 b) 9 8 6 4 2 3 0 1 5 7 c) 0 1 2 3 4 5 6 7 8 9 d) 0 2 4 3 1 6 5 9 8 7 Q7. The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)? a) 2 b) 3 c) 4 d) 6 Q8. Consider the following code snippet in C. The function print() receives root of a Binary Search Tree (BST) and a positive integer k as arguments. // A BST node struct node { int data; struct node *left, *right; }; int count = 0; void print(struct node *root, int k) { if (root != NULL && count <= k) { print(root->right, k); count++; if (count == k) printf("%d ", root->data); print(root->left, k); } } What is the output of print(root, 3) where root represent root of the following BST? 15 / \ 10 20 / \ / \ 8 12 16 25 a) 10 b) 16 c) 20 d) 20 10 Q9. While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is a) 65 b) 67 c) 69 d) 83 Q10. Suppose that we have numbers between 1 and 90 in a binary search tree and want to search for the number 54. Which of the following sequences CANNOT be the sequence of nodes examined? a) {10, 78, 65, 44, 60, 58, 54} b) {90, 15, 68, 34, 66, 48, 54} c) {9, 85, 47, 68, 43, 57, 54} d) {79, 16, 72, 56, 18, 53, 54} Q11. How do you delete a node from a binary search tree in C in the following cases? Node to be deleted is a leaf node. A. Remove the node Node to be removed has one child. A. Move the child to the node and delete the node Q12. A Binary Search Tree (BST) stores values in the range 40 to 560. Consider the following sequence of keys. I) 81, 537, 105, 439, 296, 376, 305 II) 76, 98, 126, 199, 242, 383, 482 III) 144, 258, 520, 386, 345, 270, 307 IV) 556, 169, 507, 395, 465, 402, 270 Suppose the BST has been unsuccessfully searched for key 273. Which all of the above sequences list nodes in the order in which we could have encountered them in the search? a) II and III only b) I and III only c) III and IV only d) III only