Home / Expert Answers / Computer Science / objective-demonstrate-an-understanding-of-containers-and-abstract-data-types-linked-list-concepts-pa402

(Solved): Objective Demonstrate an understanding of: Containers and Abstract Data Types Linked List Concepts ...



Objective Demonstrate an understanding of: Containers and Abstract Data Types Linked List Concepts Specification You will develop a Doubly-Linked List class based on the concepts that you have learned about linked lists. Do not inherit from the Linked List class, but feel free to duplicate any code from that class. Start with a DLLNode class, similar to the Node class. The DLLNode class should have a self.prev attribute in addition to the attributes that a linked list node has. Now let's work on the DoublyLinkedList class. First off, you will need to add a protected _tail attribute. Your code should implement the following public methods in a class called DoublyLinkedList. Some of these will identical to the LinkedList code. Others are trivially different. Still others require quite a bit of thought to implement the self.prev attribute. The new methods should behave in the same way that the LinkedList methods behaved. For example, remove_after_current() should return data. add_to_head(data) self._curr should reset to head after this action add_after_current(data) remove_from_head(data) self._curr should reset to head after this action remove_after_current() reset_to_head() reset_to_tail() move_forward() move_backward() find(data) remove(data) self._curr should reset to head after this action



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe