Stanford linked list problems