Doubly Linked List Quiz

Linked List
0 Passed
0% acceptance

A 30-question quiz exploring doubly linked list structure, node connections, pointer behavior, traversal, insertion, deletion, and edge cases.

30 Questions
~60 minutes
1

Question 1

What distinguishes a doubly linked list from a singly linked list?

A
Each node has both next and prev pointers
B
Nodes store sorted data automatically
C
Nodes hold only one pointer
D
The list always forms a loop
2

Question 2

What does the prev pointer of the head node contain?

A
null
B
The tail
C
The node after head
D
A pointer to itself
3

Question 3

Which pointer defines the final node of a doubly linked list?

A
A node whose next pointer is null
B
A node whose prev pointer is null
C
A node pointing to head
D
A node storing a special marker
4

Question 4

Which traversal direction is possible in doubly linked lists?

A
Both forward and backward
B
Forward only
C
Random jumps based on index
D
Backward only
5

Question 5

Which statement is true about memory layout?

A
Nodes do not need contiguous memory
B
Nodes must be consecutive in memory
C
Tail must be next to head
D
Prev pointers require contiguous storage
6

Question 6

What must be updated when inserting a node at the head?

A
New node’s next, new node’s prev, and old head’s prev
B
Only the tail
C
All nodes in the list
D
Only the old head’s next pointer
7

Question 7

Which deletion is simplest in a DLL?

A
Deleting the head node
B
Deleting the tail
C
Deleting a middle node
D
Deleting a node from an array
8

Question 8

When deleting a middle node, which pointer must be updated first?

A
The prev node's next pointer
B
The head pointer
C
The tail pointer
D
The deleted node’s next pointer
9

Question 9

What is required when inserting at the tail?

A
Update old tail’s next and new node’s prev
B
Rebuild the list
C
Move head to the end
D
Delete the old tail
10

Question 10

What is a risk when modifying pointers incorrectly?

A
Breaking bidirectional structure
B
Nodes sort themselves
C
The list gains a third direction
D
Tail moves to middle
11

Question 11

What does this diagram represent?

plaintext
null <- [A] <-> [B] <-> [C] -> null
A
A doubly linked list with three nodes
B
A singly linked list
C
A circular list
D
A stack
12

Question 12

Which node is the head here?

plaintext
null <- [10] <-> [20] <-> [30] -> null
A
10
B
20
C
30
D
None; circular list
13

Question 13

What is happening in this deletion?

plaintext
[A] <-> [B] <-> [C]
             ^
           delete B
A
A’s next must point to C, and C’s prev must point to A
B
C must point to itself
C
B becomes tail
D
Head becomes null
14

Question 14

What is indicated by this break?

plaintext
[X] <-> [Y] 
            X
        (broken prev link)
A
Y cannot reach X via prev anymore
B
The list is circular
C
A new tail appears
D
Head and tail swapped
15

Question 15

What does this illustrate?

plaintext
null <- [H] <-> [M] <-> [T] -> null
               |
           insert [X] after H
A
H.next = X, X.prev = H, X.next = M, M.prev = X
B
X becomes the tail
C
All nodes reverse
D
H becomes null
16

Question 16

What does this pseudocode accomplish?

plaintext
curr = tail
      while curr:
          print(curr.value)
          curr = curr.prev
A
Backward traversal of the list
B
Forward traversal
C
Middle deletion
D
Node duplication
17

Question 17

Which scenario requires updating both head and tail?

A
Creating a single-node list
B
Deleting the middle node
C
Traversing
D
Breaking a pointer
18

Question 18

Why is deletion easier in DLL than SLL?

A
DLL nodes have prev pointers
B
DLL nodes store indexes
C
DLLs have no head
D
DLLs auto-repair
19

Question 19

Which pointer must be changed when deleting the tail?

A
The previous node’s next pointer becomes null
B
The head’s prev pointer
C
The middle node only
D
All prev pointers
20

Question 20

Which statement reflects DLL symmetry?

A
Pointers update in pairs: next and prev
B
All nodes have equal memory addresses
C
No pointers exist
D
Nodes reorder automatically
21

Question 21

Which operation is O(1) in DLLs with a tail pointer?

A
Append at tail
B
Search for value
C
Random index access
D
Traversal
22

Question 22

Which structure is maintained even after deletion?

A
Bidirectional traversal ability
B
Circular loops
C
Index-based lookup
D
Array-style positions
23

Question 23

Which issue occurs if both next and prev are not updated during insertion?

A
Structural inconsistency
B
Automatic reversal
C
Node duplication
D
Sorted ordering
24

Question 24

Why must a deletion check if the node is head?

A
Head deletion requires updating the head pointer
B
Head deletion sorts the list
C
Head never changes
D
Deleting head deletes the tail automatically
25

Question 25

What occurs when prev pointers form a loop?

A
Backward traversal becomes infinite
B
List sorts itself
C
Random access becomes possible
D
Node duplication occurs
26

Question 26

Which behavior applies to a single-node DLL?

A
Head and tail reference the same node
B
Prev pointer points to head
C
Traversal requires two steps
D
Both pointers must be non-null
27

Question 27

Which pointer allows backward traversal?

A
prev
B
next
C
head
D
index
28

Question 28

What must be done before deleting the head in a DLL?

A
Set the new head’s prev to null
B
Reset the tail
C
Traverse to the tail first
D
Delete all nodes after head
29

Question 29

What is a common advantage of DLLs?

A
Efficient deletion with direct node references
B
Minimal memory usage
C
Guaranteed sorting
D
Constant-time indexing
30

Question 30

What defines DLL structure as flexible?

A
Pointer-based linking allows inserts/deletes anywhere
B
Nodes auto-manage memory
C
Node order cannot change
D
Random access is instant

QUIZZES IN Linked List