Data Structures 1 - Linked List


examples


Classwork

Assume we already have a class Cat and a class CatNode that has a variable content of type Cat.

Suppose now we are writing a CatLinkedList class, which already has a CatNode * head and a CatNode * tail. Write a module addCatAtStart that would go inside the LinkedList class; this method takes a Cat and adds it to the list, but at the front of the list instead of at the end