The implementation of doubly linked list is placed in DataStructures.py. The head and the tail are stored in member variables. The following methods for doubly linked lists have been implemented:
- init (initalizes the head and the tail of the list with None)
- insertAtHead
- insertAtTail
- deleteFromHead
- deleteFromTail
- reverse (reverses the contents of the list, i.e., 1, 2, 3 becomes 3, 2, 1)
- removeDuplicates (removes duplicate elements from the list, i.e., 1, 2, 3, 2, 1 becomes 1, 2, 3)
- print (prints the elements of the list)