Which of the following is a major advantage of linked lists over arrays?
A
Faster access time B
Static memory allocation C
Dynamic memory allocation D
Less memory usage
Analysis & Theory
Linked lists use dynamic memory allocation, allowing flexible memory use.
What does each node in a singly linked list contain?
A
Data only B
Data and address of previous node C
Data and address of next node D
Only address of next node
Analysis & Theory
Each node contains data and a pointer to the next node.
Which operation is most efficient in a linked list compared to an array?
A
Accessing an element by index B
Inserting at the beginning C
Binary search D
Sorting elements
Analysis & Theory
Inserting at the beginning is O(1) in linked lists but slower in arrays.
Which type of linked list allows traversal in both forward and backward directions?
A
Singly linked list B
Doubly linked list C
Circular linked list D
Linear linked list
Analysis & Theory
Doubly linked lists contain pointers to both previous and next nodes.
In a circular singly linked list, the last node points to:
A
Null B
Head node C
Tail node D
Itself
Analysis & Theory
In a circular list, the last node links back to the head to form a loop.
What is the time complexity to search for an element in a singly linked list?
A
O(1) B
O(log n) C
O(n) D
O(n log n)
Analysis & Theory
Singly linked list requires linear traversal → O(n).
Which of the following is NOT a valid type of linked list?
A
Doubly linked list B
Circular doubly linked list C
Tri-directional linked list D
Singly linked list
Analysis & Theory
There is no such thing as a tri-directional linked list in standard data structures.
What happens when you delete the head of a singly linked list?
A
The list becomes invalid B
The second node becomes the new head C
All nodes are deleted D
The tail is moved
Analysis & Theory
Deleting the head updates the head pointer to the second node.
Which of the following operations is difficult in singly linked lists compared to doubly linked lists?
A
Inserting at the end B
Inserting at the beginning C
Deleting the last node D
Traversing forward
Analysis & Theory
Deleting the last node in a singly linked list requires full traversal since there's no backward link.
In a doubly linked list with 'n' nodes, how many null pointers are there?
A
1 B
2 C
n D
n+1
Analysis & Theory
There are two null pointers — one at the head (prev) and one at the tail (next).