In-class linked list exercise