Lesson 2.2: Linked Lists Flashcards

1
Q

The _____ field is used to store information, and this field is important to the user.

A

info

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The _____ field is used to link together nodes to form a linked list. It is an auxiliary field used to maintain the linked list.

A

next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

IntSLLNode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The reserved word _____ is used to refer to the current object, and _____ word can appear anywhere this object can be used.

A

this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

checks if the list is empty, or if it has elements

A

boolean isEmpty()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

adds an integer argument to the end of the list

A

void addToTail(int)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

removes the element at the end of the list

A

int deleteFromTail()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

prints all the elements in the list

A

void printAll()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

adds the integer argument to the beginning of the list

A

void addToHead(int)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

removes the element at the beginning of the list

A

int deleteFromHead()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

checks if the integer argument is in the list

A

boolean isInList(int)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

deletes the first instance of argument in the list

A

void delete(int)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

It is a collection of nodes storing data and links to other nodes.

A

linked structures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A node includes two data fields: info and next. This field is used to link together nodes to form a linked list.

A

next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If a node has a link only to its successor in a given sequence, then the list is called a _______.

A

Singly Linked Lists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Another form of linked list are _____ lists. Has the reference of the tail back to the head instead of null

A

Circular Lists

17
Q

A list of this type has each node with two reference fields, the element before and after the node.

A

Doubly Linked List