Lesson 2.2: Linked Lists Flashcards
The _____ field is used to store information, and this field is important to the user.
info
The _____ field is used to link together nodes to form a linked list. It is an auxiliary field used to maintain the linked list.
next
_____ is defined in terms of itself because one data field, next, is a reference to a node of the same type that is just being defined. Objects that include such a data field are called self-referential objects.
IntSLLNode
The reserved word _____ is used to refer to the current object, and _____ word can appear anywhere this object can be used.
this
checks if the list is empty, or if it has elements
boolean isEmpty()
adds an integer argument to the end of the list
void addToTail(int)
removes the element at the end of the list
int deleteFromTail()
prints all the elements in the list
void printAll()
adds the integer argument to the beginning of the list
void addToHead(int)
removes the element at the beginning of the list
int deleteFromHead()
checks if the integer argument is in the list
boolean isInList(int)
deletes the first instance of argument in the list
void delete(int)
It is a collection of nodes storing data and links to other nodes.
linked structures
A node includes two data fields: info and next. This field is used to link together nodes to form a linked list.
next
If a node has a link only to its successor in a given sequence, then the list is called a _______.
Singly Linked Lists