Data Structures 1 - Linked List


pseudo

Book.java | BookNode.java | BookList.java | BookMain.java


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 method 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 .