Free Practice Quiz Question List

4 Linked Lists Online Quiz Questions

Use this free practice quiz with 20 questions to review 4 Linked Lists, test your knowledge, and prepare for your next test or exam.

20 questions
01
Choose one
1 point

A singly linked list already has a head reference. What is the time complexity of inserting one new node at the front?

  1. A

    The entire list must be traversed, so it is O(n)O(n).

  2. B

    The new node points to the old head and the head is updated, so it is O(1)O(1).

  3. C

    Every existing node must receive a new index, so it is O(n2)O(n^2).

  4. D

    The list must be copied into contiguous memory, so it is O(nlog⁡n)O(n \log n).

02
Choose one
1 point

Which description correctly identifies the fields normally stored in a node of a doubly linked list?

  1. A

    It stores a payload and two head references.

  2. B

    It stores a payload and a link only to the next node.

  3. C

    It stores a payload, a next link, and a prev link.

  4. D

    It stores a payload and the numeric index of every other node.

03
Choose one
1 point

Why is accessing an element by index generally faster in an array than in a linked list?

  1. A

    An array can calculate an indexed element’s address directly, while a linked list must follow links from the head to reach that position.

  2. B

    A linked list always provides faster indexed access because its nodes can be stored anywhere in memory.

  3. C

    Both structures require following links from the head before accessing any indexed element.

  4. D

    Neither structure supports access by numeric index.

04
Choose all
1 point

Which two statements accurately describe linked-list behavior or advantages? Select all correct choices.

  1. A

    It can avoid shifting many existing elements during some insertions.

  2. B

    Its nodes must always occupy consecutive memory locations.

  3. C

    Its nodes can be stored in non-contiguous memory.

  4. D

    It provides constant-time access to every numeric index.

05
Choose all
1 point

Which two statements correctly distinguish link-update costs from search costs in linked lists? Select all correct choices.

  1. A

    Insertion after a known node always requires shifting all later values.

  2. B

    Deletion after a known predecessor can be performed with a constant number of link updates.

  3. C

    Finding a node by searching from the head is always constant time.

  4. D

    Inserting between known neighboring nodes in a doubly linked list requires updating a constant number of links.

06
True or false
1 point

True or false: A singly linked list can move backward directly from a current node without first locating additional information.

  1. A

    True

  2. B

    False

07
True or false
1 point

True or false: Sorting a linked list makes ordinary binary search efficient because the list can reach its middle element quickly.

  1. A

    True

  2. B

    False

08
Written response
1 point

What term names an optional reference to the last node in a linked list?

09
Written response
1 point

What is the worst-case time complexity of searching an unsorted linked list for a value? Enter a standard Big-O expression in inline mathematical notation.

10
Fill in the blank
1 point

Complete the description of a linked-list node: A node stores a and one or more to other nodes.

11
Fill in the blank
1 point

To delete a node after a known predecessor in a singly linked list, the pointer update takes time, and the required node reference is the node.

12
Open ended
1 point

A system needs a linked sequence that is updated frequently. Explain when you would choose a singly linked list rather than a doubly linked list, and when the reverse choice would be justified. Include the relevant trade-offs.

13
Choose one
1 point

In a conventional singly linked list, how is the end of the list represented during traversal?

  1. A

    The head is set to the last node's payload.

  2. B

    The final node's next link is set to null.

  3. C

    The tail is required to point back to the head.

  4. D

    Every node stores the list's total size in its payload.

14
Choose one
1 point

What does the head of a linked list identify?

  1. A

    The reference to the first node

  2. B

    The reference to the last node

  3. C

    The number of nodes

  4. D

    The marker for an empty node

15
True or false
1 point

True or false: The nodes of a linked list must occupy consecutive memory locations.

  1. A

    True

  2. B

    False

16
Written response
1 point

In the node definition for a singly linked list, what is the usual name of the link to the following node?

17
Choose one
1 point

Which structure usually provides O(1) access to an element by numeric index?

  1. A

    A singly linked list

  2. B

    An array

  3. C

    Both structures equally

  4. D

    Neither structure

18
Choose one
1 point

A program already has a reference to the node before an insertion position in a singly linked list. What is the time complexity of performing the insertion itself?

  1. A

    O(n)O(n), because every node must be copied.

  2. B

    O(n)O(n), because the list must always be sorted first.

  3. C

    O(1)O(1), because only a small number of links are relinked.

  4. D

    O(n2)O(n^2), because two traversals are required.

19
Choose one
1 point

In a doubly linked list containing A <-> B <-> C, which updates correctly remove node B when a reference to B is available?

  1. A

    Set A.prev to C and C.next to A

  2. B

    Set A.next to C and C.prev to A

  3. C

    Set B.next to A and B.prev to C

  4. D

    Set A.next and C.next to null

20
Written response
1 point

What is the conventional name for an optional reference to the last node of a linked list?