Singly Linked List Quiz

Linked List
0 Passed
0% acceptance

A 30-question quiz covering singly linked list fundamentals, node linking, traversal, insertion, deletion, and pointer behavior.

30 Questions
~60 minutes
1

Question 1

What defines a singly linked list?

A
Each node points to the next node only
B
Each node points to both next and previous
C
Nodes store contiguous memory
D
Nodes sort themselves automatically
2

Question 2

What does the head of a list represent?

A
The first node in the list
B
The last node in the list
C
A null terminator
D
A pointer to the middle
3

Question 3

What pointer value marks the end of a singly linked list?

A
null
B
head
C
0
D
loop
4

Question 4

Why are singly linked lists slower at random access?

A
They must be traversed sequentially
B
Their nodes cannot store data
C
They store indexes explicitly
D
Their values are unsorted
5

Question 5

Which node is the tail in a singly linked list?

A
The node whose next pointer is null
B
The head
C
The middle node
D
The first inserted node
6

Question 6

What happens when inserting at the head?

A
The new node points to the old head
B
All nodes shift in memory
C
Tail pointer changes automatically
D
Middle node updates
7

Question 7

Which operation requires traversal to the end when no tail is stored?

A
Insertion at the tail
B
Insertion at the head
C
Checking emptiness
D
Reading head value
8

Question 8

Which must be updated when removing a node in the middle?

A
The previous node's next pointer
B
The head only
C
The tail always
D
All nodes
9

Question 9

Why does losing the head pointer break access to the entire list?

A
Traversal cannot begin
B
Tail becomes head automatically
C
Nodes reassign themselves
D
Null replaces all pointers
10

Question 10

What is required to insert after a certain node?

A
Adjust newNode.next and update target.next
B
Rebuild the entire list
C
Reset head
D
Create a tail pointer
11

Question 11

What does this diagram represent?

plaintext
HEAD
        |
       [4] -> [10] -> [22] -> null
A
A singly linked list of three nodes
B
A doubly linked list
C
A circular list
D
A tree
12

Question 12

Which node is the tail?

plaintext
[A] -> [B] -> [C] -> null
A
C
B
A
C
B
D
None; circular list
13

Question 13

What has occurred in this diagram?

plaintext
[1] -> [2] 
         X
      (broken link)
      
A
Node 1 no longer points to node 2
B
The list is circular
C
The tail moved to head
D
Nodes sorted themselves
14

Question 14

What does this represent?

plaintext
[x] -> null
           ^
         (lost pointer)
A
A missing reference that once pointed to the node
B
A circular list
C
Reversal
D
Two tails
15

Question 15

Which pointer must be updated here?

plaintext
[A] -> [B] -> [C]
              ^
            delete B
A
A's next pointer must point to C
B
C must point to A
C
B becomes head
D
Tail becomes null
16

Question 16

What does this depict?

plaintext
HEAD -> [9] -> [12] -> [18] -> null
                   |
                 (incorrect pointer)
A
An extra pointer could break list structure
B
A circular loop is formed
C
The list reversed
D
Tail is missing
17

Question 17

Which traversal behavior applies to singly linked lists?

A
Forward-only traversal
B
Backward traversal
C
Random pointer jumps
D
Guaranteed sorted traversal
18

Question 18

Which edge case requires special handling?

A
Deleting the head node
B
Deleting the middle node
C
Traversing three steps
D
Reading tail value
19

Question 19

What is true about memory usage?

A
Each node uses extra space for its pointer
B
All nodes are stored in a fixed block
C
Nodes must be sorted by memory address
D
Nodes contain two pointers
20

Question 20

Which operation is O(1) for singly linked lists?

A
Insertion at the head
B
Searching for a value
C
Accessing the nth index
D
Appending without tail pointer
21

Question 21

What does this pseudocode do?

plaintext
curr = head
      while curr != null:
          print(curr.value)
          curr = curr.next
A
Traverses and prints all nodes
B
Reverses the list
C
Deletes nodes
D
Finds the tail only
22

Question 22

What is the result of this operation?

plaintext
new.next = head
      head = new
A
Insert new node at the head
B
Insert at the tail
C
Delete head
D
Reverse the list
23

Question 23

What happens during this deletion?

plaintext
prev.next = prev.next.next
A
The node after prev is removed
B
The head is removed
C
The list becomes circular
D
Tail becomes head
24

Question 24

What does this represent?

plaintext
prev = null
      curr = head
      while curr:
          next = curr.next
          curr.next = prev
          prev = curr
          curr = next
      head = prev
A
Reversing a singly linked list
B
Duplicating nodes
C
Breaking the list
D
Searching for a value
25

Question 25

What best describes insertion at tail without tail pointer?

A
It requires traversing to the final node
B
It happens in O(1)
C
Tail pointer auto-updates
D
It is impossible
26

Question 26

Which list state is represented when head is null?

A
Empty list
B
Circular list
C
Broken DLL
D
Sorted list
27

Question 27

Which action risks losing the entire list?

A
Overwriting head without saving it
B
Deleting the tail
C
Reading a node value
D
Skipping a traversal step
28

Question 28

Which is a defining property of singly linked lists?

A
Nodes connect in one direction only
B
Nodes connect bidirectionally
C
Nodes must be contiguous
D
Each node stores an index
29

Question 29

Which pointer is essential for traversal?

A
The next pointer of each node
B
A previous pointer
C
A parent pointer
D
An index marker
30

Question 30

Overall, what do singly linked lists emphasize?

A
Flexible insertions and deletions via pointer links
B
Fast random access
C
Index-based operations
D
Fixed-size memory blocks

QUIZZES IN Linked List