Beginner
Data Structures & Algorithms
Q3 / 100
What is the time complexity of inserting an element at the beginning of a singly linked list?
Correct! Well done.
Incorrect.
The correct answer is D) O(1)
D
Correct Answer
O(1)
Explanation
Inserting at the head only requires creating a new node and updating one pointer, which takes constant time regardless of list length.
Progress
3/100