Question: CSE 2 ( 0 / 2 ) 2 5 Data Structures PROJECT # 2 ( Due December 2 0 , 2 0 2 4 ,

CSE2(0/2)25 Data Structures PROJECT #2(Due December 20,2024, Friday) In this project, you are required to write a program to compare the performance of Splay trees with a modified version of Splay trees (mod-Splay) based on the two criteria: the total number of comparisons and the number of rotations. You will be given a text file as input, and your program will read the characters in the text and insert the non-existing ones as keys in the corresponding tree (Splay or mod-Splay) or otherwise (i.e., if existent) find them and update their occurrence frequency in the text. For splay tree, you will make the necessary splay(s) after reading each character in the text (i.e., if the access is to a key other than the root). For the mod-splay tree, you will make the necessary splay(s) once the occurrence frequency of the key accessed (and that is not at the root) becomes the highest in the entire splay tree (i.e., greater than that at the root!). The number of comparisons will be considered for both the successful and the unsuccessful searches (i.e., insertions). Further a splay in both splay and mod-splay trees costs as many tus as the number of depth levels the keys have moved through.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!