Question: Make sure your C - code compiles. Any non - compiling code will receive a very low mark.Thepseudocodeto be given in the code as a

Make sure your C-code compiles. Any non-compiling code will receive a very low mark.Thepseudocodeto be given in the code as a comment. This is20%of the marks.Each algorithm is to be associated with aflowchartin pdf. This is30%of the marks.Submit the code file as .c and the flowchart as .pdf files.Do not make .zip or .rar files. Upload them as separate files. Those who uploadcompressed file like .zip or .rarwill get zero mark.Question : Merging DictionariesThis project is a continuation of Project 1. However, you do not need all the codes fromProject 1. Assume that from Project 1, you have the function that deletes and inserts anelement into a dictionary (Please refer to Project 1 file for more info). Assume that thesefunctions are implemented as DeleteElement, InsertElement and UpdateElement, where ineach case the functions take an array name and the dictionary value.For this project, we want you to merge two dictionaries. Assume that two dictionaries aregiven to you. Here you will implement three algorithms. All three algorithms to be im-plemented via a function, where the function takes three arrays and their StartingIndex asparameters.Algorithm 1(15 Points): Take one dictionary, and insert the elements of the other dictionaryone-by-one by uisng the InsertElement function (If you have implemented this function inProject 1 you can use it here, otherwise, just provide the function call via prototyping).1
Algorithm 2(15 Points): Get the StartingIndex for both arrays and make another arraywith the size equal to the total size of both dictionaries to be merged. Then, by comparingthe dictionary values at the startingIndex for both arrays, insert the elements to the thirdarray in a sorted manner until all the elements from both arrays are transferred to the thirdarray.Algorithm 3(50 Points): Balanced Binary Search Tree Merge Description: This algorithminvolves using a balanced binary search tree (BST) to merge two dictionaries. Each dictio-nary is first converted into a balanced BST (if not already), and then one tree is merged intothe other by inserting all its elements. This ensures that the final tree remains balanced,preserving optimal access times.After you implement the algorithms, provide a complexity analysis for all three algorithmsand determine the efficient algorithm in terms of time and space usage.(20 Points)You can make any other necessary assumptions.You should print the content of the arrays to indicate that the merging is done success-fully

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 Databases Questions!