Write a score board program that can store the runs of the individual players in singly linked. User can save the run on specific location as per batting order in the list. If the requested location doesn't exist in the list or already filled by some other player, Show the error message and request user to re-enter correct batting order.
Once you done insertion operation for all eleven players, a method named “generateBBst” create a balanced binary search tree and take the score of first player as a root node and add rest of the score accordingly as per BST rules. Following mandatory methods must have in your program along with supporting methods.
· treeHeight() : Return the height of the tree.
· mergeSort() : Display the BST by using merge sort approach .
· searchTime: Calculate the number of comparison to find the specific node value.
Comments
Leave a comment