# Complete the implementation of the removeFirst() method for DoublyLinkedList a) The removeFirst() methods is not implemented. You

## Question:

Complete the implementation of the removeFirst() method for DoublyLinkedList

a) The removeFirst() methods is not implemented. You need to implement it. Begin by drawing a picture of a doubly-linked list with at least three nodes, and drawing what should happen when you removeFirst(). Number the operations.

b) Now draw a picture of a doubly-linked list with only one element in it and draw what should happen when you removeFirst(). Number the operations.

c) Write pseudocode for the implementation of the removeFirst() method.

**Part 2**

Complete the implementation of the removeLast() method for DoublyLinkedList

a) Draw a picture for a double-linked list with at least three elements in it. Draw what should happen when you removeLast(). Number the order of operations.

b) Draw the picture for the edge case (with only one node in the list).*I.e. what should happen when you removeLast() with only one node in the list.*Number the order of operations.

c) Write pseudocode for the removeLast() method. Consider and include the edge case of there being only one node (and throwing an exception if the list is empty).

**Related Book For**

## Introduction to Java Programming, Comprehensive Version

ISBN: 978-0133761313

10th Edition

Authors: Y. Daniel Liang

**Posted Date:**