A tail pointer is a pointer variable to the last node in a chain of linked nodes. Write a link-based implementation for a class of double-ended lists, as specified in Exercise 12, that uses both a head pointer and a tail pointer.
Exercise 12:
A double-ended list has operations that operate at its beginning and end, in addition to the operations of the list, as given in Section 8.1of Chapter 8. For example, you can add, remove, and get the first and last entries in a double-ended list. Write a C++ interface for a double-ended list.