Question: 3. Part C, A1C (10 marks) Write a Python program, with the given Python files. Doubly-Linked List (DLL): Implement a Doubly-Linked List 6 Students have



3. Part C, A1C (10 marks) Write a Python program, with the given Python files. Doubly-Linked List (DLL): Implement a Doubly-Linked List 6 Students have learnt conventional (Singly-) Linked-List in our course. In this part, students should implement a simple version of Doubly-Linked List: Each node in this Doubly-Linked List has two links: one for the next node as in singly- linked list, the other for the previous node. The head node has no previous link and the tail node has no next link. Some operations could be done for efficiently with this Doubly-Linked List, which require tracing backward (the previous node of the current node). o Students should reuse and modify the given codes of (Singly-) Linked-List in our course. head tail QO9001-000000 File Aonec.py, to be modified and completed by student. 0 Include a given class of nodes with a value and two links (to previous and next nodes): # Aonec.py, for IDSA Assign 1 class DLNode: # modelling a node with doubly-linked def __init_(self, invalue=None, inPrev=None, inNext=None): # constructor self.value = inValue # the node data value, default None self.prevN = inPrev # the previous node, default None self.nextN = inNext # the next node, default None class DLList: # defining a class of Doubly-Linked List def __init_(self): # constructor self.headN = None # the head Node self.tailN = None # the tail Node # MORE TO BE MODIFIED AND FINISHED Given Materials: Python file Aonec.py, to be modified and completed by student. Also modify top comments for your STUDENT INFO. (DO NOT modify this given portions, including given methods if any) Python file Aonect.py for basic running and testing. DO NOT modify this given test file, except the STUDENT INFO part. Sample console display output of executing the main testing program Aonect.py === A A1C, DLList program, by
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
