Back to marketplace

Chapter - 35 Lists and linked lists

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

What is a list?

Back (Answer)

» Ordered data structure » Dynamic » Accessing the data involves using an index

#2
Front (Question)

What is the operation to test an empty list?

Back (Answer)

» isEmpty()

#3
Front (Question)

What is the operation to add a new item to list to the end of the list?

Back (Answer)

» Append(item)

#4
Front (Question)

What operation is used to remove the first occurrence of an item from the list?

Back (Answer)

» remove(item)

#5
Front (Question)

What operation is used to search for an item in a list?

Back (Answer)

» search(item)

#6
Front (Question)

What operation can you use to return the number of items in a list?

Back (Answer)

» length()

#7
Front (Question)

What operation can return the position of an item?

Back (Answer)

» index(item)

#8
Front (Question)

What operation can insert a new item at a position number?

Back (Answer)

» insert(pos,item)

#9
Front (Question)

What operation can remove and return the last item in the list?

Back (Answer)

» pop()

#10
Front (Question)

What operation can remove and return the item at a position number?

Back (Answer)

» pop(pos)

#11
Front (Question)

What is the difference between an array and a list?

Back (Answer)

» List is dynamic » Array is static

#12
Front (Question)

How do you insert a new name in the list?

Back (Answer)

» Test whether the list is already full, print message if it is and quit » Determine where new item needs to be inserted » Starting at the end of the list, move other items along one piece » Insert new item in correct place

#13
Front (Question)

How do you delete a name from the list?

Back (Answer)

» First delete the name » Names coming after deleted item need to me moved up to fill the empty space - by copying them to the previous spot in the array » Finally the last element which is now duplicated is replaced with a blank

#14
Front (Question)

What is a linked list?

Back (Answer)

» Dynamic data structure used to hold an sequence » It provides a foundation upon which other structures can be built

#15
Front (Question)

What are some features of a linked list?

Back (Answer)

» Items which form the sequence are not necessarily held in contiguous data locations, or in the order in which they occur in the sequence

#16
Front (Question)

What is each item in the linked list called?

Back (Answer)

» A Node » Contains a data field and a next address field called a link or pointer field

#17
Front (Question)

What does the data field contain?

Back (Answer)

» Actual data associated with the list item

#18
Front (Question)

What does the pointer field contain?

Back (Answer)

» The address of the next item in the sequence

#19
Front (Question)

What is the use of the null pointer?

Back (Answer)

» The link field in the last item indicates that are no further items by the use of a null pointer

#20
Front (Question)

What is the start pointer?

Back (Answer)

» Identifies the first node in the list

#21
Front (Question)

How do we initialize a linked list?

Back (Answer)

» Keep two linked lists » One for the actual data » One for the free space

#22
Front (Question)

What does the start pointer aim to in a new initalised linked list?

Back (Answer)

» First item in the list, initialised to null

#23
Front (Question)

What does null indicate?

Back (Answer)

» A list is empty

#24
Front (Question)

Which pointer does the last item of an empty list have?

Back (Answer)

» Pointer of null