Question: [PYTHON] CMPSC-122: Intermediate Programming Spring 2018 Homework 7 Due Date: 04/18/2018,7:59 am 100 points Overview A data structure is a particular way of organizing and
[PYTHON]
![[PYTHON] CMPSC-122: Intermediate Programming Spring 2018 Homework 7 Due Date: 04/18/2018,7:59 am](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f66b6470127_37966f66b63d8192.jpg)


CMPSC-122: Intermediate Programming Spring 2018 Homework 7 Due Date: 04/18/2018,7:59 am 100 points Overview A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data. [1] Instructions: In class, we discussed the Doubly Linked List Abstract Data Type (section1.1.4 of your Lecture Notes). A Doubly Linked List contains an extra pointer (known as previous pointer) allowing the traversal of the list in both forward and backward direction. When implementing the LinkedList data structure, we observed the importance of updating the pointers in order to get access to the entire list. Implement the data structure DoublyLinkedList with the following characteristics . DoublyLinkedListO creates a new doubly linked list that is empty. It needs no parameters . addFirt(item) adds a new Node with value-item at the beginning of the list. It needs the addLast(item) adds a new Node with value-item at the end of the list. It needs the item and and returns nothing. Assume the items in the list are unique item and returns nothing. [20 pts] returns nothing. [20 pts] . addBefore(pnode value, item) adds a new Node with value-item before the Node with value-pnode value. It needs the value of the reference Node and the item to be added, returns nothing. You can assume the reference node is in the list. [30 ptsj] . addAfter(pnode value, item) adds a new Node with value-item after the Node with value-pnode value. It needs the value of the reference Node and the item to be added, returns nothing. You can assume the reference node is in the list. [30 pts] NOTE: There is no partial credit for methods that do not work properly. Code will be tested calling all methods and comparing the final list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
