Question: Python Programming Language CSCA48 Exercise 3 Due: June 9, 2018. 5:00 pm In this exercise you will be practicing working with double linked lists (

Python Programming LanguagePython Programming Language CSCA48 Exercise 3 Due: June 9, 2018. 5:00 pm

CSCA48 Exercise 3 Due: June 9, 2018. 5:00 pm In this exercise you will be practicing working with double linked lists ( You are required to write two functions for which you need to import the DNode and DoubleLinkedList class that was implemented in the lecture i.e. from week4 DLL import . You can only use the methods that are provided in this code and you're not allowed to add any method to it. A) a function called reverse merge that takes two double linked lists as its input parameters. The first linked list contains the surname of Marzieh's students in CSCA48 sorted ascendingly and the second contains the surname of Nick's students for the same course sorted in a descending order In order to allocate a room for term test 1, we need to merge these two lists to one list that contains all the student's surname sorted ascendingly. Therefore, your function should return a DLL containing all the 8 A function called allocate_room that takes four parameters; a dll containing students' surnames, a string representing room name and number, an int representing the capacity of the room and an int representing the index of the node that contains the surname of the first person that is assigned to this room. Your job is to return a string that shows the two first letters of the surnames of the first and last person that should attend the given room. Here is an example: >>allocate room (csca48 list, SW319, 80, 150) SW319 JU-MO What we know/ don't know We don't know how many students registered for each class therefore you should expect that the length of these two lists are not the same. We know that both Marzieh and Nick implemented their DLLs with a dummy head and tail. csca48_list is also a dl implemented with a dummy head and tail. None of the lists are empty. In fact, before we call these two functions, we check to see if the lists are empty If they are, we don't call the functions. We found that there are a few students who registered for both the lectures therefore their surnames are in two lists. Obviously the resulting list should not repeat their names. e It is absolutely fine if the capacity of the room is n and we only have m students, wherem>allocate room (csca48 list, SW319, 80, 150) SW319 JU-MO What we know/ don't know We don't know how many students registered for each class therefore you should expect that the length of these two lists are not the same. We know that both Marzieh and Nick implemented their DLLs with a dummy head and tail. csca48_list is also a dl implemented with a dummy head and tail. None of the lists are empty. In fact, before we call these two functions, we check to see if the lists are empty If they are, we don't call the functions. We found that there are a few students who registered for both the lectures therefore their surnames are in two lists. Obviously the resulting list should not repeat their names. e It is absolutely fine if the capacity of the room is n and we only have m students, wherem

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!